-
Notifications
You must be signed in to change notification settings - Fork 5k
LibCI enhancement - recycle all ports at start & disable all ports when finish #12078
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
|
Jetson had 2 failures,
|
Now it looks better, I added a 3 sec sleep after HW reset before we start the next test (for mipi (port is None) only ) Please review |
unit-tests/py/rspy/devices.py
Outdated
| :return: True if all devices have come back online before timeout | ||
| """ | ||
|
|
||
| usb_serial_numbers = {dev.serial_number for dev in _device_by_sn.values() if dev.port is not None and dev.serial_number in serial_numbers} |
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 will work.
But seems kind of unneeded since _device_by_sn is already keyed to SNs:
usb_serial_numbers = {sn for sn in serial_numbers if _device_by_sn[sn].port is not None}
This will also throw if given a SN that's invalid. Good IMO.
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.
Done
maloel
left a comment
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.
See my one comment for improvement. Otherwise looks good.
69635eb to
00a44ee
Compare
This PR change 2 behaviors:
When starting LibCI it used to enable all ports and discover the cameras,
If a device port was enabled on the previous run, it stays on.
If it failed and even the FW crashed on last run, this device will not be discovered in the next run as it's port is already on and the FW crashed.
Now we will always start from a fresh power cycle of the device
When LibCI finish, disable all ports.
No need to keep devices on between LibCI runs. D585S for example is projecting laser from the moment it get power.
No need for the laser to be on all weekend.
This should extend the HW life