File tree Expand file tree Collapse file tree 5 files changed +31
-33
lines changed
device/esp_tinyusb/test_apps/vendor
host/class/cdc/usb_host_cdc_acm/host_test/main Expand file tree Collapse file tree 5 files changed +31
-33
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ jobs:
1919 - uses : actions/checkout@v4
2020 with :
2121 submodules : ' true'
22- - name : Build USB Test Application
22+ - name : Build and Test
2323 shell : bash
2424 run : |
2525 . ${IDF_PATH}/export.sh
26- pip install pytest pytest-cpp idf-build-apps==2.4.3 --upgrade
26+ pip install pytest idf-build-apps==2.4.3 --upgrade
2727 idf-build-apps find --target linux
2828 idf-build-apps build --target linux
29- pytest host/class/cdc/usb_host_cdc_acm/host_test/build_linux
29+ chmod +x $GITHUB_WORKSPACE/run_host_tests.sh && $GITHUB_WORKSPACE/run_host_tests.sh
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ def ep_write(buf):
6868@pytest .mark .esp32s3
6969@pytest .mark .esp32p4
7070@pytest .mark .usb_device
71- def test_usb_device_esp_tinyusb (dut : IdfDut ) -> None :
71+ def test_usb_device_vendor (dut : IdfDut ) -> None :
7272 '''
7373 Running the test locally:
7474 1. Build the test app for your DUT
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11[pytest]
22# only the files with prefix `pytest_` would be recognized as pytest test scripts.
33python_files = pytest_*.py
4- cpp_files = host_test_*.elf
54
65# set traceback to "short" to prevent the overwhelming tracebacks
76addopts =
87 -s
8+ --embedded-services esp,idf
99 --tb short
1010
1111markers =
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Extra arguments for the .elf files, to make the host test results and failures more informative
4+ # (https://github.com/catchorg/Catch2/tree/devel/docs)
5+ EXTRA_ARGS=" --reporter Automake --reporter console::out=-::colour-mode=ansi"
6+
7+ # Indicator for the CI job, whether a host test has failed or not
8+ TEST_FAILED=0
9+
10+ # # Find all host_test*.elf files
11+ for test_file in $( find . -type f -name " host_test*.elf" ) ; do
12+ echo " Running $test_file ..."
13+ " $test_file " $EXTRA_ARGS # Call the host_test*.elf file with the extra arguments
14+ if [ $? -ne 0 ]; then # Check whether the host test failed
15+ TEST_FAILED=1
16+ fi
17+ done
18+
19+ # Return exit value 1 (FAIL) 0 (PASS) to ensure that the CI job passes/fails
20+ if [ $TEST_FAILED -ne 0 ]; then
21+ echo " Some host tests failed."
22+ exit 1
23+ else
24+ echo " All host tests passed."
25+ exit 0
26+ fi
You can’t perform that action at this time.
0 commit comments