diff --git a/unit-tests/py/rspy/test.py b/unit-tests/py/rspy/test.py index d8c6425869..e513878a5c 100644 --- a/unit-tests/py/rspy/test.py +++ b/unit-tests/py/rspy/test.py @@ -561,7 +561,6 @@ def finish( on_fail=LOG ): log.i("Test passed") test_in_progress = None - def print_separator(): """ For use only in-between test-cases, this will separate them in some visual way so as diff --git a/unit-tests/run-unit-tests.py b/unit-tests/run-unit-tests.py index 3bdda1ac9f..1cda72b9f1 100644 --- a/unit-tests/run-unit-tests.py +++ b/unit-tests/run-unit-tests.py @@ -274,7 +274,7 @@ def configuration_str( configuration, repetition=0, retry=0, sns=None, prefix='' elif sns is not None: s += '[' + serial_numbers_to_string( sns ) + ']' if repetition: - s += '[' + str(repetition+1) + ']' + s += f'[rep {repetition+1}]' if retry: s += f'[retry {retry}]' if s: @@ -454,10 +454,19 @@ def test_wrapper( test, configuration=None, repetition=1, sns=None ): global n_tests n_tests += 1 for retry in range( test.config.retries + 1 ): + if retry: + if log.is_debug_on(): + log.debug_unindent() # just to make it stand out a little more + log.d( f' Failed; retry #{retry}' ) + log.debug_indent() + if no_reset: + time.sleep(1) # small pause between tries + else: + devices.enable_only( serial_numbers, recycle=True ) if test_wrapper_( test, configuration, repetition, retry, sns ): return True log._n_errors -= 1 - time.sleep( 1 ) # small pause between tries + log._n_errors += 1 return False