Skip to content

Commit

Permalink
test ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tore-espressif committed Sep 27, 2024
1 parent 9b6737b commit dbe50ea
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .build-test-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ device/esp_tinyusb:
host/class:
enable:
- if: SOC_USB_OTG_SUPPORTED == 1

host/class/cdc/usb_host_cdc_acm/host_test:
enable:
- if: IDF_TARGET in ["linux"]
6 changes: 5 additions & 1 deletion .github/workflows/build_and_run_test_app_usb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ jobs:
export EXTRA_CXXFLAGS="${PEDANTIC_FLAGS}"
idf-build-apps find
idf-build-apps build
- name: Run Host tests
run: |
pip install pytest pytest-cpp
pytest host/class/cdc/usb_host_cdc_acm/host_test/build_linux
- uses: actions/upload-artifact@v4
with:
name: usb_test_app_bin_${{ matrix.idf_ver }}
Expand Down Expand Up @@ -63,4 +67,4 @@ jobs:
PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi/"
run: pip install --only-binary cryptography pytest-embedded pytest-embedded-serial-esp pytest-embedded-idf pyserial pyusb
- name: Run USB Test App on target
run: pytest --target=${{ matrix.idf_target }} -m usb_host --build-dir=build_${{ matrix.idf_target }}
run: pytest --embedded-services esp,idf --target=${{ matrix.idf_target }} -m usb_host --build-dir=build_${{ matrix.idf_target }}
3 changes: 2 additions & 1 deletion host/class/cdc/usb_host_cdc_acm/host_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set(COMPONENTS main)

list(APPEND EXTRA_COMPONENT_DIRS
"$ENV{IDF_PATH}/tools/mocks/usb/"
"$ENV{IDF_PATH}/tools/mocks/freertos/"
)

project(usb_cdc_host_test)
project(host_test_usb_cdc)
4 changes: 4 additions & 0 deletions host/class/cdc/usb_host_cdc_acm/host_test/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ idf_component_register(SRC_DIRS .
INCLUDE_DIRS .
PRIV_INCLUDE_DIRS "../../private_include"
WHOLE_ARCHIVE)

# Currently 'main' for IDF_TARGET=linux is defined in freertos component.
# Since we are using a freertos mock here, need to let Catch2 provide 'main'.
target_link_libraries(${COMPONENT_LIB} PRIVATE Catch2WithMain)
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
- ASIX Electronics Corp. AX88772B (i-tec)
- Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter (AXAGON)
- Modems:
- Qualcomm / Option SimTech SIM7080 (SIM7070G)
- NOT TESTED: Qualcomm / Option SimTech SIM7080 (SIM7070G)
- Quectel Wireless Solutions Co., Ltd. BG96 CAT-M1/NB-IoT modem
- Qualcomm / Option SimTech SIM7000 (SIM7000E)
- Qualcomm / Option SimTech, Incorporated (SIM7600E)
- Qualcomm / Option SimTech SIM7080 (SIM7080G)
- Qualcomm / Option A76XX Series LTE Module (SIMA7672E)
- NOT TESTED: Qualcomm / Option SimTech SIM7000 (SIM7000E)
- NOT TESTED: Qualcomm / Option SimTech SIM7080 (SIM7080G)
- NOT TESTED: Qualcomm / Option A76XX Series LTE Module (SIMA7672E)
- USB dongle:
- NOT TESTED: Shenzhen Rapoo Technology Co., Ltd. Rapoo 2.4G Wireless Device
- NOT TESTED: Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ CONFIG_IDF_TARGET="linux"
CONFIG_COMPILER_CXX_EXCEPTIONS=y
CONFIG_ESP_MAIN_TASK_STACK_SIZE=12000
CONFIG_FREERTOS_HZ=1000
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y
CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=n
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[pytest]
# only the files with prefix `pytest_` would be recognized as pytest test scripts.
python_files = pytest_*.py
cpp_files = host_test_*.elf

# set traceback to "short" to prevent the overwhelming tracebacks
addopts =
-s
--embedded-services esp,idf
--tb short

markers =
Expand Down

0 comments on commit dbe50ea

Please sign in to comment.