Skip to content
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

Merged
merged 4 commits into from May 13, 2024
Merged

Conversation

Nir-Az
Copy link
Collaborator

@Nir-Az Nir-Az commented May 9, 2024

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

  • also add some helpful prints

@Nir-Az Nir-Az marked this pull request as ready for review May 9, 2024 06:05
@Nir-Az Nir-Az marked this pull request as draft May 9, 2024 06:05
@Nir-Az Nir-Az marked this pull request as ready for review May 9, 2024 06:24
@Nir-Az Nir-Az closed this May 9, 2024
@Nir-Az Nir-Az reopened this May 9, 2024
@@ -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
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

@@ -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)
Copy link
Collaborator

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:

@maloel maloel merged commit 53b5d60 into IntelRealSense:development May 13, 2024
16 of 17 checks passed
maloel added a commit to maloel/librealsense that referenced this pull request May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants