Merge pull request #11853 from sanjuprakashk/testrunner-timeout

dist/pythonlibs/testrunner: dynamic changing of test timeout
This commit is contained in:
Kevin "Bear Puncher" Weiss 2019-07-18 11:57:31 +02:00 committed by GitHub
commit f932999df4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,8 +15,13 @@ import pexpect
from .spawn import find_exc_origin, setup_child, teardown_child
from .unittest import PexpectTestCase # noqa, F401 expose to users
# Timeout for tests can be changed by setting RIOT_TEST_TIMEOUT to the desired
# value in the environment variables
# default value (10)
TIMEOUT = int(os.environ.get('RIOT_TEST_TIMEOUT') or 10)
def run(testfunc, timeout=10, echo=True, traceback=False):
def run(testfunc, timeout=TIMEOUT, echo=True, traceback=False):
child = setup_child(timeout, env=os.environ,
logfile=sys.stdout if echo else None)
try: