Unit-test test:device acroname control (for py only) - #8359
Merged
Conversation
Nir-Az
reviewed
Feb 14, 2021
| if timeout <= 0: | ||
| return False | ||
| timeout -= 1 | ||
| time.sleep( 1 ) |
Collaborator
There was a problem hiding this comment.
Remember you can use "timer" class utility if you want :)
Contributor
Author
There was a problem hiding this comment.
I went to do that, but saw that in this case it wouldn't necessarily reduce code much, so left as-is.
| while True: | ||
| have_devices = False | ||
| for sn in serial_numbers: | ||
| if sn in _device_by_sn: |
Collaborator
There was a problem hiding this comment.
No need for " global _device_by_sn"?
| # | ||
| have_all_devices = True | ||
| for sn in serial_numbers: | ||
| if sn not in _device_by_sn: |
| @@ -1,5 +1,12 @@ | |||
| from rspy import acroname | |||
| try: | |||
| @@ -0,0 +1,90 @@ | |||
| # License: Apache 2.0. See LICENSE file in root directory. | |||
| # Copyright(c) 2020 Intel Corporation. All Rights Reserved. | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Separated log functionality into
rspy.logmoduleUse
devicesmodule from run-unit-tests.pyChanged python subprocess invocation to
sys.executableHWM cmd
SET_AGE->UNIT_AGE_SET, to fit XML