diff options
| author | Ha Thach <[email protected]> | 2024-10-01 00:02:08 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-10-01 00:02:08 +0700 |
| commit | 254167bdbdbbe25c13f17c05f16b15d9b96a80e9 (patch) | |
| tree | cfffdb2388a2cd59ee049578ef5894656f98293f | |
| parent | e209acb8d3624d3e6e6b6cee827bf4a97a4b138c (diff) | |
| parent | d6c8719bcb1607e6b0c668f15655de483e15f02e (diff) | |
Merge pull request #2823 from hathach/hil-piousb-host-optional
HIL have dual/host_info_to_device_cdc optional for pico/pico2
| -rw-r--r-- | test/hil/hil_test.py | 13 | ||||
| -rw-r--r-- | test/hil/tinyusb.json | 1 |
2 files changed, 9 insertions, 5 deletions
diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py index 2d14220c5..f152b1aa9 100644 --- a/test/hil/hil_test.py +++ b/test/hil/hil_test.py @@ -240,8 +240,13 @@ def test_dual_host_info_to_device_cdc(board): print(f'\r\n {l} ', end='') enum_dev_sn.append(f'{vid_pid_sn.group(1)}_{vid_pid_sn.group(2)}_{vid_pid_sn.group(3)}') - assert(set(declared_devs) == set(enum_dev_sn)), \ - f'Enumerated devices {enum_dev_sn} not match with declared {declared_devs}' + if set(declared_devs) != set(enum_dev_sn): + # for pico/pico2 make this test optional + failed_msg = f'Enumerated devices {enum_dev_sn} not match with declared {declared_devs}' + if 'raspberry_pi_pico' in board['name']: + print(f'\r\n {failed_msg} ', end='') + else: + assert False, failed_msg return 0 @@ -405,6 +410,8 @@ def test_board(board): if 'tests' in board: board_tests = board['tests'] + if 'dual_attached' in board_tests: + test_list += dual_tests if 'only' in board_tests: test_list = board_tests['only'] if 'skip' in board_tests: @@ -412,8 +419,6 @@ def test_board(board): if skip in test_list: test_list.remove(skip) print(f'{name:25} {skip:30} ... Skip') - if 'dual_attached' in board_tests: - test_list += dual_tests # board_test is added last to disable board's usb test_list.append('device/board_test') diff --git a/test/hil/tinyusb.json b/test/hil/tinyusb.json index fcd004c6d..066dc5876 100644 --- a/test/hil/tinyusb.json +++ b/test/hil/tinyusb.json @@ -59,7 +59,6 @@ "flasher_sn": "E6633861A3978538", "flasher_args": "-f interface/cmsis-dap.cfg -f target/rp2350.cfg -c \"adapter speed 5000\"", "tests": { - "skip": ["dual/host_info_to_device_cdc"], "dual_attached": [{"vid_pid": "1a86_55d4", "serial": "533D004242"}] } }, |
