From d9b9ab51cf3326184ebbc55cf0030d10b9f69988 Mon Sep 17 00:00:00 2001 From: Nir Azkiel Date: Thu, 9 May 2024 09:03:03 +0300 Subject: [PATCH] some changes --- unit-tests/py/rspy/test.py | 1 - unit-tests/run-unit-tests.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/unit-tests/py/rspy/test.py b/unit-tests/py/rspy/test.py index d8c64258696..e513878a5c2 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 a65482a5f95..b240f0cded6 100644 --- a/unit-tests/run-unit-tests.py +++ b/unit-tests/run-unit-tests.py @@ -433,7 +433,7 @@ def test_wrapper_( test, configuration=None, repetition=1, retry=0, sns=None ): configuration_str( configuration, repetition, suffix=' ' ) + 'exited with non-zero value (' + str( cpe.returncode ) + ')' ) else: - return True + return log.n_errors() == 0 return False @@ -441,13 +441,13 @@ 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 test_wrapper_( test, configuration, repetition, retry, sns ) and log.n_errors() == 0: + if test_wrapper_( test, configuration, repetition, retry, sns ): return True log._n_errors -= 1 if no_reset: time.sleep(1) # small pause between tries elif retry < test.config.retries: - log.d("retry", retry + 1, "out of", test.config.retries) + log.w("retry", retry + 1, "out of", test.config.retries) devices.enable_only(serial_numbers, recycle=True) log._n_errors += 1