-
Couldn't load subscription status.
- Fork 4.9k
Unit-test test:device acroname control (for py only) #8359
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
Conversation
| if timeout <= 0: | ||
| return False | ||
| timeout -= 1 | ||
| time.sleep( 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.
Remember you can use "timer" class utility if you want :)
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 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: |
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.
No need for " global _device_by_sn"?
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.
Fixed
| # | ||
| have_all_devices = True | ||
| for sn in serial_numbers: | ||
| if sn not in _device_by_sn: |
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.
global needed?
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.
Fixed
| @@ -1,5 +1,12 @@ | |||
| from rspy import acroname | |||
| try: | |||
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.
License?
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.
Added
unit-tests/py/rspy/log.py
Outdated
| @@ -0,0 +1,90 @@ | |||
| # License: Apache 2.0. See LICENSE file in root directory. | |||
| # Copyright(c) 2020 Intel Corporation. All Rights Reserved. | |||
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.
2021
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.
Changed :)
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.
LGTM :)
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