mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-15 17:43:51 +01:00
Merge pull request #8053 from cladmi/pr/testrunner/make_start_delay_configurable
dist/tools/testrunner: Make started wait time configurable
This commit is contained in:
commit
631705d743
7
dist/tools/testrunner/testrunner.py
vendored
7
dist/tools/testrunner/testrunner.py
vendored
@ -19,6 +19,11 @@ PEXPECT_PATH = os.path.dirname(pexpect.__file__)
|
||||
RIOTBASE = os.environ['RIOTBASE'] or \
|
||||
os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", ".."))
|
||||
|
||||
# Setting an empty 'TESTRUNNER_START_DELAY' environment variable use the
|
||||
# default value (3)
|
||||
MAKE_TERM_STARTED_DELAY = int(os.environ.get('TESTRUNNER_START_DELAY') or 3)
|
||||
|
||||
|
||||
def list_until(l, cond):
|
||||
return l[:([i for i, e in enumerate(l) if cond(e)][0])]
|
||||
|
||||
@ -33,7 +38,7 @@ def run(testfunc, timeout=10, echo=True, traceback=False):
|
||||
child = pexpect.spawnu("make term", env=env, timeout=timeout)
|
||||
|
||||
# on many platforms, the termprog needs a short while to be ready...
|
||||
time.sleep(3)
|
||||
time.sleep(MAKE_TERM_STARTED_DELAY)
|
||||
|
||||
if echo:
|
||||
child.logfile = sys.stdout
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user