diff options
| author | hathach <[email protected]> | 2024-08-28 11:43:14 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-08-28 11:43:14 +0700 |
| commit | 6fdf206f11f3c540b1930693826a469f3ffcc240 (patch) | |
| tree | a57c476996bac1e4451b89cb3a9259d4aac85a30 /test | |
| parent | c46adc7ba883d569e1bd2a0a5852bf64093d4ff4 (diff) | |
bump up pio-usb to 0.6.1, enable dual hil test for pico
Diffstat (limited to 'test')
| -rw-r--r-- | test/hil/hil_test.py | 18 | ||||
| -rw-r--r-- | test/hil/rpi.json | 1 |
2 files changed, 12 insertions, 7 deletions
diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py index 5a4799cfb..52ec5ae1d 100644 --- a/test/hil/hil_test.py +++ b/test/hil/hil_test.py @@ -39,6 +39,9 @@ import fs ENUM_TIMEOUT = 30 +STATUS_OK = "\033[32mOK\033[0m" +STATUS_FAILED = "\033[31mFailed\033[0m" +STATUS_SKIPPED = "\033[33mSkipped\033[0m" # get usb serial by id def get_serial_dev(id, vendor_str, product_str, ifnum): @@ -411,7 +414,7 @@ def test_board(board): if not os.path.exists(fw_dir): fw_dir = f'examples/cmake-build-{name}/{test}' fw_name = f'{fw_dir}/{os.path.basename(test)}' - print(f'{name:30} {test:20} ... ', end='') + print(f'{name:25} {test:30} ... ', end='') if not os.path.exists(fw_dir): print('Skip') @@ -432,11 +435,11 @@ def test_board(board): print('OK') except Exception as e: err_count += 1 - print('Failed') + print(STATUS_FAILED) print(f' {e}') else: err_count += 1 - print('Flash failed') + print(f'Flash {STATUS_FAILED}') return err_count @@ -463,10 +466,13 @@ def main(): else: config_boards = [e for e in config['boards'] if e['name'] in boards] - err_count_list = [] with Pool(processes=os.cpu_count()) as pool: - err_count_list = pool.map(test_board, config_boards) - err_count = sum(err_count_list) + err_count = sum(pool.map(test_board, config_boards)) + + print() + print("-" * 30) + print(f'Total failed: {err_count}') + print("-" * 30) sys.exit(err_count) diff --git a/test/hil/rpi.json b/test/hil/rpi.json index 259f8ca83..36376a873 100644 --- a/test/hil/rpi.json +++ b/test/hil/rpi.json @@ -49,7 +49,6 @@ "flasher_sn": "E6614103E72C1D2F", "flasher_args": "-f interface/cmsis-dap.cfg -f target/rp2040.cfg -c \"adapter speed 5000\"", "tests": { - "skip": ["dual/host_info_to_device_cdc"], "dual_attached": [{"vid_pid": "1a86_55d4", "serial": "52D2002470"}] } }, |
