diff --git a/unit-tests/run-unit-tests.py b/unit-tests/run-unit-tests.py index 459ed82075..98a136789c 100644 --- a/unit-tests/run-unit-tests.py +++ b/unit-tests/run-unit-tests.py @@ -421,6 +421,8 @@ def test_wrapper_( test, configuration=None, repetition=1, retry=0, sns=None ): if rslog: opts.add( '--rslog' ) try: + if repetition > 0: + log.d("repeat #", repetition + 1) test.run_test( configuration = configuration, log_path = log_path, opts = opts ) except FileNotFoundError as e: log.e( log.red + test.name + log.reset + ':', str( e ) + configuration_str( configuration, repetition, prefix=' ' ) ) @@ -560,8 +562,6 @@ def test_wrapper( test, configuration=None, repetition=1, sns=None ): test_ok = True for repetition in range(repeat): test_ok = test_wrapper( test, repetition = repetition ) and test_ok - if repetition + 1 < repeat: - log.d("repeating #", repetition + 1) if not test_ok: failed_tests.append( test ) continue @@ -585,8 +585,6 @@ def test_wrapper( test, configuration=None, repetition=1, sns=None ): log.w( log.red + test.name + log.reset + ': ' + str( e ) ) else: test_ok = test_wrapper( test, configuration, repetition, sns=serial_numbers ) and test_ok - if repetition + 1 < repeat: - log.d("repeating #", repetition + 1) finally: log.debug_unindent() if not test_ok: