Skip to content

Commit

Permalink
replace 'sns' with 'serial_numbers'
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel committed May 16, 2024
1 parent 66337ca commit fa561ae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions unit-tests/run-unit-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ):
Expand All @@ -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 or not sns:
if no_reset or not serial_numbers:
time.sleep(1) # small pause between tries
else:
devices.enable_only( sns, recycle=True )
if test_wrapper_( test, configuration, repetition, retry, sns ):
devices.enable_only( serial_numbers, recycle=True )
if test_wrapper_( test, configuration, repetition, retry, serial_numbers ):
return True
log._n_errors -= 1

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit fa561ae

Please sign in to comment.