mirror of
https://github.com/gosticks/RIOT.git
synced 2026-10-05 15:27:09 +00:00
dist/testrunner: add optional delay before opening serial
This option is null by default but is useful when used with boards exposing their stdio over USB
This commit is contained in:
Vendored
+8
@@ -28,6 +28,10 @@ MAKE_TERM_STARTED_DELAY = int(os.environ.get('TESTRUNNER_START_DELAY') or 3)
|
||||
# default value (0, no delay)
|
||||
MAKE_RESET_DELAY = int(os.environ.get('TESTRUNNER_RESET_DELAY') or 0)
|
||||
|
||||
# Setting an empty 'TESTRUNNER_CONNECT_DELAY' environment variable use the
|
||||
# default value (0)
|
||||
MAKE_TERM_CONNECT_DELAY = int(os.environ.get('TESTRUNNER_CONNECT_DELAY') or 0)
|
||||
|
||||
# Allow customizing test interactive settings with environment variables
|
||||
TEST_INTERACTIVE_RETRIES = int(os.environ.get('TEST_INTERACTIVE_RETRIES') or 5)
|
||||
TEST_INTERACTIVE_DELAY = int(os.environ.get('TEST_INTERACTIVE_DELAY') or 1)
|
||||
@@ -66,6 +70,10 @@ def setup_child(timeout=10, spawnclass=pexpect.spawnu, env=None, logfile=None):
|
||||
# before `cleanterm`.
|
||||
_reset_board(env)
|
||||
|
||||
# on platforms exposing UART over USB, wait a little before connecting to
|
||||
# the serial terminal. This gives time for stdio to be ready.
|
||||
time.sleep(MAKE_TERM_CONNECT_DELAY)
|
||||
|
||||
child = spawnclass("make cleanterm", env=env, timeout=timeout,
|
||||
codec_errors='replace', echo=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user