diff --git a/unit-tests/run-unit-tests.py b/unit-tests/run-unit-tests.py index 1cda72b9f1..0b52053050 100644 --- a/unit-tests/run-unit-tests.py +++ b/unit-tests/run-unit-tests.py @@ -450,7 +450,7 @@ def test_wrapper_( test, configuration=None, repetition=1, retry=0, sns=None ): return False -def test_wrapper( test, configuration=None, repetition=1, sns=None ): +def test_wrapper( test, configuration=None, repetition=1, serial_numbers=None ): global n_tests n_tests += 1 for retry in range( test.config.retries + 1 ): @@ -459,11 +459,11 @@ def test_wrapper( test, configuration=None, repetition=1, sns=None ): log.debug_unindent() # just to make it stand out a little more log.d( f' Failed; retry #{retry}' ) log.debug_indent() - if no_reset: + if no_reset or not serial_numbers: time.sleep(1) # small pause between tries else: devices.enable_only( serial_numbers, recycle=True ) - if test_wrapper_( test, configuration, repetition, retry, sns ): + if test_wrapper_( test, configuration, repetition, retry, serial_numbers ): return True log._n_errors -= 1 @@ -599,7 +599,7 @@ def test_wrapper( test, configuration=None, repetition=1, sns=None ): except RuntimeError as e: log.w( log.red + test.name + log.reset + ': ' + str( e ) ) else: - test_ok = test_wrapper( test, configuration, repetition, sns=serial_numbers ) and test_ok + test_ok = test_wrapper( test, configuration, repetition, serial_numbers ) and test_ok finally: log.debug_unindent() if not test_ok: