diff options
Diffstat (limited to 'test/hil/hil_flash.py')
| -rwxr-xr-x | test/hil/hil_flash.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/hil/hil_flash.py b/test/hil/hil_flash.py index 2ff6b8b64..30850300b 100755 --- a/test/hil/hil_flash.py +++ b/test/hil/hil_flash.py @@ -100,10 +100,14 @@ def _openocd_cmd_base(flasher): print(f'warning: {uid} has a malformed vid_pid {flasher["vid_pid"]!r} ' f'(want "0xVVVV 0xPPPP"); probe pin DROPPED, so discovery will open ' f'foreign usbfs nodes', file=sys.stderr, flush=True) - elif flasher.get('uid') not in _VID_PID_WARNED: + elif ('interface/jlink.cfg' not in (flasher.get('args') or '') + and flasher.get('uid') not in _VID_PID_WARNED): # stderr, once per probe: test_example captures stdout, so a passing run would # swallow this and the operator would never learn discovery still opens every - # usbfs node + # usbfs node. Skipped over the jlink driver: libjaylink discovery gates on + # idVendor == 0x1366 before libusb_open (same rationale as convoy_safe's + # docstring), so it never opens a foreign node regardless of the missing pin -- + # the warning would be false there. _VID_PID_WARNED.add(flasher.get('uid')) print(f'warning: openocd flasher {flasher.get("uid", "?")} has no vid_pid pin; ' f'probe discovery will open every usbfs node (hangs on a wedged one)', @@ -149,6 +153,9 @@ def flash_openocd_seq(board, firmware, timeout=None): def reset_openocd_seq(board, timeout=None): + # Behaviorally reset_openocd, but this exact invocation is what was bench-validated + # over the jlink transport on all seven flasher_recover boards — don't fold into + # reset_openocd (or change either) without re-benching the recovery path. flasher = board['flasher'] return hil_util.run_cmd( f'{_openocd_cmd_base(flasher)} -c "init" -c "reset run" -c "shutdown"', |
