Skip to content

Commit

Permalink
Merge branch 'ci/migrate_wifi_unit_test_app' into 'master'
Browse files Browse the repository at this point in the history
CI: Migrate wifi unit tests to componment_ut

Closes IDF-5586

See merge request espressif/esp-idf!20787
  • Loading branch information
ydesp committed Nov 11, 2022
2 parents 5ac2bb7 + a78d492 commit a05e899
Show file tree
Hide file tree
Showing 22 changed files with 780 additions and 765 deletions.
103 changes: 97 additions & 6 deletions .gitlab/ci/rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,18 +216,19 @@
- "examples/protocols/**/*"
- "examples/wifi/**/*"
- "examples/network/simple_sniffer/**/*"

- "components/esp_phy/**/*"
- "components/esp_wifi/**/*"
- "components/esp_netif/**/*"
- "components/lwip/**/*"
# components
- "components/mbedtls/port/dynamic/*"

# for cases with wifi_high_traffic marker
- "examples/system/ota/**/*"
- "components/app_update/**/*"
- "components/esp_https_ota/**/*"

.patterns-target_test-wifi: &patterns-target_test-wifi
- "components/esp_phy/**/*"
- "components/esp_wifi/**/*"
- "components/esp_netif/**/*"
- "components/lwip/**/*"

# for jobs: UT_044, UT_045
.patterns-unit_test-sdio: &patterns-unit_test-sdio
- "components/esp_serial_slave_link/**/*"
Expand Down Expand Up @@ -556,6 +557,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:component_ut-esp32:
rules:
Expand All @@ -581,6 +584,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:component_ut-esp32c2:
rules:
Expand All @@ -602,6 +607,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:component_ut-esp32c3:
rules:
Expand All @@ -626,6 +633,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:component_ut-esp32c6:
rules:
Expand All @@ -650,6 +659,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:component_ut-esp32h4:
rules:
Expand All @@ -674,6 +685,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:component_ut-esp32s2:
rules:
Expand All @@ -698,6 +711,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:component_ut-esp32s3:
rules:
Expand All @@ -722,6 +737,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:custom_test:
rules:
Expand Down Expand Up @@ -749,6 +766,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:custom_test-esp32:
rules:
Expand All @@ -770,6 +789,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:custom_test-esp32c2:
rules:
Expand All @@ -788,6 +809,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:custom_test-esp32c3:
rules:
Expand All @@ -808,6 +831,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:custom_test-esp32c6:
rules:
Expand All @@ -828,6 +853,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:custom_test-esp32s2:
rules:
Expand All @@ -848,6 +875,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:custom_test-esp32s3:
rules:
Expand All @@ -868,6 +897,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:docker:
rules:
Expand Down Expand Up @@ -922,6 +953,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:example_test-esp32:
rules:
Expand Down Expand Up @@ -954,6 +987,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:example_test-esp32c2:
rules:
Expand All @@ -980,6 +1015,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:example_test-esp32c3:
rules:
Expand Down Expand Up @@ -1011,6 +1048,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:example_test-esp32c6:
rules:
Expand Down Expand Up @@ -1041,6 +1080,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:example_test-esp32h4:
rules:
Expand Down Expand Up @@ -1071,6 +1112,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:example_test-esp32s2:
rules:
Expand Down Expand Up @@ -1101,6 +1144,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:example_test-esp32s3:
rules:
Expand Down Expand Up @@ -1131,6 +1176,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:integration_test:
rules:
Expand Down Expand Up @@ -1232,6 +1279,8 @@
changes: *patterns-integration_test
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi
- <<: *if-dev-push
changes: *patterns-unit_test
- <<: *if-dev-push
Expand Down Expand Up @@ -1263,6 +1312,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi
- <<: *if-dev-push
changes: *patterns-unit_test
- <<: *if-dev-push
Expand All @@ -1288,6 +1339,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi
- <<: *if-dev-push
changes: *patterns-unit_test
- <<: *if-dev-push
Expand All @@ -1312,6 +1365,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi
- <<: *if-dev-push
changes: *patterns-unit_test-sdio
- <<: *if-dev-push
Expand All @@ -1334,6 +1389,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi
- <<: *if-dev-push
changes: *patterns-unit_test
- <<: *if-dev-push
Expand All @@ -1358,6 +1415,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi
- <<: *if-dev-push
changes: *patterns-unit_test
- <<: *if-dev-push
Expand All @@ -1382,6 +1441,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi
- <<: *if-dev-push
changes: *patterns-unit_test
- <<: *if-dev-push
Expand All @@ -1406,6 +1467,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi
- <<: *if-dev-push
changes: *patterns-unit_test
- <<: *if-dev-push
Expand Down Expand Up @@ -1473,6 +1536,19 @@
- <<: *if-dev-push
changes: *patterns-component_ut-adc

.rules:test:component_ut-esp32-wifi:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:test:component_ut-esp32c2:
rules:
- <<: *if-revert-branch
Expand Down Expand Up @@ -1524,6 +1600,19 @@
- <<: *if-dev-push
changes: *patterns-component_ut-adc

.rules:test:component_ut-esp32c3-wifi:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32c3
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:test:component_ut-esp32h4-i154:
rules:
- <<: *if-revert-branch
Expand Down Expand Up @@ -1716,6 +1805,8 @@
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:test:example_test-esp32c2:
rules:
Expand Down
16 changes: 16 additions & 0 deletions .gitlab/ci/target-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,14 @@ component_ut_pytest_esp32_generic_multi_device:
- build_pytest_components_esp32
tags: [ esp32, generic_multi_device ]

component_ut_pytest_esp32_wifi_two_dut:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32-wifi
needs:
- build_pytest_components_esp32
tags: [ esp32, wifi_two_dut ]

component_ut_pytest_esp32_adc:
extends:
- .pytest_components_dir_template
Expand Down Expand Up @@ -484,6 +492,14 @@ component_ut_pytest_esp32c3_generic_multi_device:
- build_pytest_components_esp32c3
tags: [ esp32c3, generic_multi_device ]

component_ut_pytest_esp32c3_wifi_two_dut:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32c3-wifi
needs:
- build_pytest_components_esp32c3
tags: [ esp32c3, wifi_two_dut ]

component_ut_pytest_esp32c3_adc:
extends:
- .pytest_components_dir_template
Expand Down
15 changes: 15 additions & 0 deletions components/esp_wifi/.build-test-rules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps

components/esp_wifi/test_apps/wifi_connect:
disable:
- if: IDF_TARGET == "esp32c6"
temporary: true
reason: target esp32c6 is not supported yet
disable_test:
- if: IDF_TARGET not in ["esp32", "esp32c3"]
reason: leak of runner
components/esp_wifi/test_apps/wifi_function:
disable:
- if: IDF_TARGET == "esp32c6"
temporary: true
reason: target esp32c6 is not supported yet
Loading

0 comments on commit a05e899

Please sign in to comment.