From a0714298a3e80e090cd61581a2294f97a8fb9149 Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Thu, 17 Jun 2021 10:58:55 +0200 Subject: [PATCH 1/2] tests/turo: reset before opening terminal Some BOARD terminals are slow to start so if the BOARD is reset after opening the terminal this can lead to off-by-one error when parsing the output. So instead do as testrunner and reset before opening the terminal. Note that no interactive_sync is needed since a similar mechanism happens in ShellInteraction. --- tests/turo/tests/01-run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/turo/tests/01-run.py b/tests/turo/tests/01-run.py index 1476f58570..2d8ed0bcec 100755 --- a/tests/turo/tests/01-run.py +++ b/tests/turo/tests/01-run.py @@ -21,10 +21,10 @@ class TestTuroBase(unittest.TestCase): @classmethod def setUpClass(cls): cls.ctrl = RIOTCtrl() + cls.ctrl.reset() cls.ctrl.start_term() if cls.DEBUG: cls.ctrl.term.logfile = sys.stdout - cls.ctrl.reset() cls.shell = ShellInteraction(cls.ctrl) cls.json_parser = RapidJSONShellInteractionParser() cls.logger = logging.getLogger(cls.__name__) From 94da3ed9a7b4b2d5bbb209e7ce0f00ba708774a3 Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Thu, 17 Jun 2021 11:03:42 +0200 Subject: [PATCH 2/2] tests/congure: reset before opening terminal Some BOARD terminals are slow to start so if the BOARD is reset after opening the terminal this can lead to off-by-one error when parsing the output. So instead do as testrunner and reset before opening the terminal. Note that no interactive_sync is needed since a similar mechanism happens in ShellInteraction. --- tests/congure_test/tests/01-run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/congure_test/tests/01-run.py b/tests/congure_test/tests/01-run.py index 5fc8ef0901..677606cf2d 100755 --- a/tests/congure_test/tests/01-run.py +++ b/tests/congure_test/tests/01-run.py @@ -24,10 +24,10 @@ class TestCongUREBase(unittest.TestCase): @classmethod def setUpClass(cls): cls.ctrl = RIOTCtrl() + cls.ctrl.reset() cls.ctrl.start_term() if cls.DEBUG: cls.ctrl.term.logfile = sys.stdout - cls.ctrl.reset() cls.shell = ShellInteraction(cls.ctrl) cls.json_parser = RapidJSONShellInteractionParser() cls.json_parser.set_parser_args(