Skip to content

Commit

Permalink
fixup! add devices.py --PORT <#> to disable others
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel committed May 26, 2024
1 parent 4671841 commit 0fa4f46
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions unit-tests/py/rspy/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,10 @@ def get_phys_port(dev):
ports = [int(port) for port in str_ports if port.isnumeric() and int(port) in all_ports]
if len(ports) != len(str_ports):
log.f( 'Invalid ports', str_ports )
# With --port, leave other ports alone
# With --PORT, disable other ports
# This would otherwise require --none, wait, --port)
# Note that it does not recycle the port if it was already enabled
hub.enable_ports( ports, disable_other_ports=(opt == '--PORT') )
action = 'none'
elif opt in ('--ports'):
Expand Down

0 comments on commit 0fa4f46

Please sign in to comment.