-
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
Conversation
unit-tests/run-unit-tests.py
Outdated
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
This should happen only if retry < test.config.retries.
Anyway, same comment as before: move to before line 446 and check if retry > 0. And the log (line 452) should now be taken care of by test_wrapper_(), right?
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.
There is a difference between retry and repeat, repeat is currently handles inside, retry outside.
I will think about it.
unit-tests/run-unit-tests.py
Outdated
@@ -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) |
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:
if not log.is_debug_on() or repetition or retry:
When a test fails and retry it doesn't reset the device so normally it fails again.
This PR make sure the device is resetting before each try