-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LibCI - Recycle device on retry #12911
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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=' ' ) ) | ||
|
@@ -444,7 +446,12 @@ def test_wrapper( test, configuration=None, repetition=1, sns=None ): | |
if test_wrapper_( test, configuration, repetition, retry, sns ): | ||
return True | ||
log._n_errors -= 1 | ||
time.sleep( 1 ) # small pause between tries | ||
if no_reset: | ||
time.sleep(1) # small pause between tries | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should happen only if retry < test.config.retries. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a difference between retry and repeat, repeat is currently handles inside, retry outside. |
||
elif retry < test.config.retries: | ||
log.w("retry", retry + 1, "out of", test.config.retries) | ||
devices.enable_only(serial_numbers, recycle=True) | ||
|
||
log._n_errors += 1 | ||
return False | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a retry, not a repetition? Oh wait... I think you want to check both retry and repetition here... but I think
configuration_str()
already does all this for you, why not use it?Replace line 414 with: