summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2024-08-28 14:57:55 +0700
committerGitHub <[email protected]>2024-08-28 14:57:55 +0700
commit669f341b0be27fb9024e0ed8b5e64cfe6a83cb8a (patch)
treee70149fa06f0b1c31be371cdf6ab400ee8eab4f1 /test
parentc46adc7ba883d569e1bd2a0a5852bf64093d4ff4 (diff)
parent0d542a0bdc3931aa82469db5d2b8c329ea5aa2e9 (diff)
Merge pull request #2780 from hathach/bump-pio-usb
bump up pio-usb to 0.6.1
Diffstat (limited to 'test')
-rw-r--r--test/hil/hil_test.py18
-rw-r--r--test/hil/rpi.json1
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"}]
}
},