diff --git a/.gitlab/ci/rules.yml b/.gitlab/ci/rules.yml index e2339c1682..8c5538f24b 100644 --- a/.gitlab/ci/rules.yml +++ b/.gitlab/ci/rules.yml @@ -1720,6 +1720,19 @@ - <<: *if-dev-push changes: *patterns-target_test-adc +.rules:test:component_ut-esp32c2-wifi: + rules: + - <<: *if-revert-branch + when: never + - <<: *if-protected + - <<: *if-label-build-only + when: never + - <<: *if-label-component_ut + - <<: *if-label-component_ut_esp32c2 + - <<: *if-label-target_test + - <<: *if-dev-push + changes: *patterns-target_test-wifi + .rules:test:component_ut-esp32c3: rules: - <<: *if-revert-branch @@ -1871,6 +1884,19 @@ - <<: *if-dev-push changes: *patterns-component_ut-usb +.rules:test:component_ut-esp32s3-wifi: + rules: + - <<: *if-revert-branch + when: never + - <<: *if-protected + - <<: *if-label-build-only + when: never + - <<: *if-label-component_ut + - <<: *if-label-component_ut_esp32s3 + - <<: *if-label-target_test + - <<: *if-dev-push + changes: *patterns-target_test-wifi + .rules:test:custom_test-esp32: rules: - <<: *if-revert-branch @@ -2055,6 +2081,21 @@ - <<: *if-dev-push changes: *patterns-target_test-adc +.rules:test:example_test-esp32c2-wifi: + rules: + - <<: *if-revert-branch + when: never + - <<: *if-protected + - <<: *if-label-build-only + when: never + - <<: *if-label-example_test + - <<: *if-label-example_test_esp32c2 + - <<: *if-label-target_test + - <<: *if-dev-push + changes: *patterns-example_test-wifi + - <<: *if-dev-push + changes: *patterns-target_test-wifi + .rules:test:example_test-esp32c3: rules: - <<: *if-revert-branch @@ -2092,6 +2133,21 @@ when: never - <<: *if-example_test-ota-include_nightly_run-rule +.rules:test:example_test-esp32c3-wifi: + rules: + - <<: *if-revert-branch + when: never + - <<: *if-protected + - <<: *if-label-build-only + when: never + - <<: *if-label-example_test + - <<: *if-label-example_test_esp32c3 + - <<: *if-label-target_test + - <<: *if-dev-push + changes: *patterns-example_test-wifi + - <<: *if-dev-push + changes: *patterns-target_test-wifi + .rules:test:example_test-esp32c6: rules: - <<: *if-revert-branch @@ -2189,6 +2245,21 @@ - <<: *if-dev-push changes: *patterns-target_test-adc +.rules:test:example_test-esp32s3-wifi: + rules: + - <<: *if-revert-branch + when: never + - <<: *if-protected + - <<: *if-label-build-only + when: never + - <<: *if-label-example_test + - <<: *if-label-example_test_esp32s3 + - <<: *if-label-target_test + - <<: *if-dev-push + changes: *patterns-example_test-wifi + - <<: *if-dev-push + changes: *patterns-target_test-wifi + .rules:test:example_test-i154: rules: - <<: *if-revert-branch diff --git a/.gitlab/ci/target-test.yml b/.gitlab/ci/target-test.yml index 3b0d2c2281..f84c600474 100644 --- a/.gitlab/ci/target-test.yml +++ b/.gitlab/ci/target-test.yml @@ -200,6 +200,22 @@ example_test_pytest_esp32_wifi_ap: - build_pytest_examples_esp32 tags: [ esp32, wifi_ap ] +example_test_pytest_esp32c3_wifi_ap: + extends: + - .pytest_examples_dir_template + - .rules:test:example_test-esp32c3-wifi + needs: + - build_pytest_examples_esp32c3 + tags: [ esp32c3, wifi_ap ] + +example_test_pytest_esp32s3_wifi_ap: + extends: + - .pytest_examples_dir_template + - .rules:test:example_test-esp32s3-wifi + needs: + - build_pytest_examples_esp32s3 + tags: [ esp32s3, wifi_ap ] + example_test_pytest_esp32_wifi_router: extends: - .pytest_examples_dir_template @@ -208,6 +224,22 @@ example_test_pytest_esp32_wifi_router: - build_pytest_examples_esp32 tags: [ esp32, wifi_router ] +example_test_pytest_esp32c3_wifi_router: + extends: + - .pytest_examples_dir_template + - .rules:test:example_test-esp32c3-wifi + needs: + - build_pytest_examples_esp32c3 + tags: [ esp32c3, wifi_router ] + +example_test_pytest_esp32s3_wifi_router: + extends: + - .pytest_examples_dir_template + - .rules:test:example_test-esp32s3-wifi + needs: + - build_pytest_examples_esp32s3 + tags: [ esp32s3, wifi_router ] + example_test_pytest_esp32_wifi_wlan: extends: - .pytest_examples_dir_template @@ -240,6 +272,30 @@ example_test_pytest_esp32_wifi_two_dut: - build_pytest_examples_esp32 tags: [ esp32, wifi_two_dut ] +example_test_pytest_esp32c3_wifi_two_dut: + extends: + - .pytest_examples_dir_template + - .rules:test:example_test-esp32c3-wifi + needs: + - build_pytest_examples_esp32c3 + tags: [ esp32c3, wifi_two_dut ] + +example_test_pytest_esp32s3_wifi_two_dut: + extends: + - .pytest_examples_dir_template + - .rules:test:example_test-esp32s3-wifi + needs: + - build_pytest_examples_esp32s3 + tags: [ esp32s3, wifi_two_dut ] + +example_test_pytest_esp32c2_wifi_two_dut: + extends: + - .pytest_examples_dir_template + - .rules:test:example_test-esp32c2-wifi + needs: + - build_pytest_examples_esp32c2 + tags: [ esp32c2, wifi_two_dut, xtal_26mhz ] + example_test_pytest_esp32c3_flash_encryption: extends: - .pytest_examples_dir_template @@ -609,6 +665,22 @@ component_ut_pytest_esp32c3_wifi_two_dut: - build_pytest_components_esp32c3 tags: [ esp32c3, wifi_two_dut ] +component_ut_pytest_esp32s3_wifi_two_dut: + extends: + - .pytest_components_dir_template + - .rules:test:component_ut-esp32s3-wifi + needs: + - build_pytest_components_esp32s3 + tags: [ esp32s3, wifi_two_dut ] + +component_ut_pytest_esp32c2_wifi_two_dut: + extends: + - .pytest_components_dir_template + - .rules:test:component_ut-esp32c2-wifi + needs: + - build_pytest_components_esp32c2 + tags: [ esp32c2, wifi_two_dut, xtal_26mhz ] + component_ut_pytest_esp32c3_adc: extends: - .pytest_components_dir_template diff --git a/components/esp_phy/test/test_phy_rtc.c b/components/esp_phy/test/test_phy_rtc.c index 6173f648e4..f855daeb99 100644 --- a/components/esp_phy/test/test_phy_rtc.c +++ b/components/esp_phy/test/test_phy_rtc.c @@ -13,12 +13,10 @@ #include "soc/soc_caps.h" #include "esp_private/wifi.h" - -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2, ESP32C6) +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C6) //IDF-5046 -#include "esp_phy_init.h" -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32C3) +#include "esp_phy_init.h" //Function just extern, need not test #if SOC_BT_SUPPORTED @@ -97,20 +95,6 @@ static IRAM_ATTR void test_phy_rtc_cache_task(void *arg) spi_flash_enable_interrupts_caches_and_other_cpu(); #endif //CONFIG_IDF_TARGET_ESP32 -#if CONFIG_IDF_TARGET_ESP32C3 - extern void bt_bb_v2_init_cmplx(int print_version); - ESP_LOGI(TAG, "Test bt_bb_v2_init_cmplx()..."); - spi_flash_disable_interrupts_caches_and_other_cpu(); - bt_bb_v2_init_cmplx(0); - spi_flash_enable_interrupts_caches_and_other_cpu(); - - extern void coex_pti_v2(void); - ESP_LOGI(TAG, "Test coex_pti_v2()..."); - spi_flash_disable_interrupts_caches_and_other_cpu(); - coex_pti_v2(); - spi_flash_enable_interrupts_caches_and_other_cpu(); -#endif //CONFIG_IDF_TARGET_ESP32C3 - #endif //SOC_BT_SUPPORTED //power down wifi and bt mac bb power domain @@ -132,6 +116,4 @@ TEST_CASE("Test PHY/RTC functions called when cache is disabled", "[phy_rtc][cac vSemaphoreDelete(semphr_done); } -#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32C3) - -#endif //!TEMPORARY_DISABLED_FOR_TARGETS(...) +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C6) diff --git a/components/esp_wifi/.build-test-rules.yml b/components/esp_wifi/.build-test-rules.yml index daf15a8836..02d625d72f 100644 --- a/components/esp_wifi/.build-test-rules.yml +++ b/components/esp_wifi/.build-test-rules.yml @@ -1,15 +1,10 @@ # 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"] + - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3", "esp32c2"] 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 + - if: SOC_WIFI_SUPPORTED != 1 diff --git a/components/esp_wifi/test_apps/wifi_connect/README.md b/components/esp_wifi/test_apps/wifi_connect/README.md index b5be4985c5..7e7523ec85 100644 --- a/components/esp_wifi/test_apps/wifi_connect/README.md +++ b/components/esp_wifi/test_apps/wifi_connect/README.md @@ -1,2 +1,2 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | diff --git a/components/esp_wifi/test_apps/wifi_connect/pytest_wifi_connect.py b/components/esp_wifi/test_apps/wifi_connect/pytest_wifi_connect.py index 1df0b0933d..b53cf631f7 100644 --- a/components/esp_wifi/test_apps/wifi_connect/pytest_wifi_connect.py +++ b/components/esp_wifi/test_apps/wifi_connect/pytest_wifi_connect.py @@ -1,12 +1,28 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 import pytest +from idf_unity_tester import CaseTester @pytest.mark.esp32 @pytest.mark.esp32c3 +@pytest.mark.esp32s3 @pytest.mark.wifi_two_dut @pytest.mark.parametrize('count', [2], indirect=True) -def test_wifi_connect_cases(case_tester) -> None: # type: ignore +def test_wifi_connect_cases(case_tester: CaseTester) -> None: # type: ignore + case_tester.run_all_cases() + + +@pytest.mark.esp32c2 +@pytest.mark.wifi_two_dut +@pytest.mark.xtal_26mhz +@pytest.mark.parametrize( + 'count, config, baud', + [ + (2, 'esp32c2_xtal26m', '74880'), + ], + indirect=True, +) +def test_wifi_connect_cases_esp32c2_xtal26m(case_tester: CaseTester) -> None: case_tester.run_all_cases() diff --git a/components/esp_wifi/test_apps/wifi_connect/sdkconfig.ci.esp32c2_xtal26m b/components/esp_wifi/test_apps/wifi_connect/sdkconfig.ci.esp32c2_xtal26m new file mode 100644 index 0000000000..172f022b67 --- /dev/null +++ b/components/esp_wifi/test_apps/wifi_connect/sdkconfig.ci.esp32c2_xtal26m @@ -0,0 +1,2 @@ +CONFIG_IDF_TARGET="esp32c2" +CONFIG_XTAL_FREQ_26=y diff --git a/components/esp_wifi/test_apps/wifi_function/README.md b/components/esp_wifi/test_apps/wifi_function/README.md index 27995c13b2..cd9be654c0 100644 --- a/components/esp_wifi/test_apps/wifi_function/README.md +++ b/components/esp_wifi/test_apps/wifi_function/README.md @@ -1,3 +1,3 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | diff --git a/components/esp_wifi/test_apps/wifi_function/pytest_wifi_function.py b/components/esp_wifi/test_apps/wifi_function/pytest_wifi_function.py index 1814f7a21a..843b6dfce7 100644 --- a/components/esp_wifi/test_apps/wifi_function/pytest_wifi_function.py +++ b/components/esp_wifi/test_apps/wifi_function/pytest_wifi_function.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 import pytest @@ -6,9 +6,24 @@ from pytest_embedded import Dut @pytest.mark.supported_targets -@pytest.mark.temp_skip_ci(targets=['esp32c6'], reason='c6 support TBD') +@pytest.mark.temp_skip_ci(targets=['esp32c2'], reason='esp32c2 are using xtal_26mhz') @pytest.mark.generic def test_wifi_unit_test(dut: Dut) -> None: dut.expect_exact('Press ENTER to see the list of tests') dut.write('*') dut.expect_unity_test_output() + + +@pytest.mark.esp32c2 +@pytest.mark.xtal_26mhz +@pytest.mark.parametrize( + 'config, baud', + [ + ('esp32c2_xtal26m', '74880'), + ], + indirect=True, +) +def test_wifi_connect_cases_esp32c2_xtal26m(dut: Dut) -> None: + dut.expect_exact('Press ENTER to see the list of tests') + dut.write('*') + dut.expect_unity_test_output() diff --git a/components/esp_wifi/test_apps/wifi_function/sdkconfig.ci.esp32c2_xtal26m b/components/esp_wifi/test_apps/wifi_function/sdkconfig.ci.esp32c2_xtal26m new file mode 100644 index 0000000000..172f022b67 --- /dev/null +++ b/components/esp_wifi/test_apps/wifi_function/sdkconfig.ci.esp32c2_xtal26m @@ -0,0 +1,2 @@ +CONFIG_IDF_TARGET="esp32c2" +CONFIG_XTAL_FREQ_26=y diff --git a/components/wpa_supplicant/test/test_crypto.c b/components/wpa_supplicant/test/test_crypto.c index 6f4c78bb7f..c569661d22 100644 --- a/components/wpa_supplicant/test/test_crypto.c +++ b/components/wpa_supplicant/test/test_crypto.c @@ -19,8 +19,6 @@ typedef struct crypto_bignum crypto_bignum; -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) -//IDF-5046 TEST_CASE("Test crypto lib bignum apis", "[wpa_crypto]") { { @@ -318,6 +316,8 @@ TEST_CASE("Test crypto lib bignum apis", "[wpa_crypto]") #endif /* bits in mbedtls_mpi_uint */ #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C6) +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5046 /* * Create an MPI from embedded constants * (assumes len is an exact multiple of sizeof mbedtls_mpi_uint) @@ -541,5 +541,5 @@ TEST_CASE("Test crypto lib ECC apis", "[wpa_crypto]") } } -#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C6) #endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C6) diff --git a/components/wpa_supplicant/test/test_eloop.c b/components/wpa_supplicant/test/test_eloop.c index bb1c06c267..a997204417 100644 --- a/components/wpa_supplicant/test/test_eloop.c +++ b/components/wpa_supplicant/test/test_eloop.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ @@ -18,7 +18,6 @@ #include "memory_checks.h" #include -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C6) uint32_t timeouts_usec[6] = { 10000, 1000, 10000, 5000, 15000, 1000 }; uint32_t timeouts_sec[6] = { 10, 1, 10, 5, 15, 1 }; int executed_order[6]; @@ -83,4 +82,3 @@ TEST_CASE("Test eloop timers run", "[eloop]") TEST_ESP_OK(esp_wifi_deinit()); os_sleep(3, 0); } -#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C6) diff --git a/components/wpa_supplicant/test/test_sae.c b/components/wpa_supplicant/test/test_sae.c index 8dd06d889f..f0af4c602e 100644 --- a/components/wpa_supplicant/test/test_sae.c +++ b/components/wpa_supplicant/test/test_sae.c @@ -20,8 +20,6 @@ #include "utils/wpabuf.h" #include "test_utils.h" -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) -//IDF-5046 typedef struct crypto_bignum crypto_bignum; @@ -261,6 +259,4 @@ TEST_CASE("Test SAE functionality with ECC group", "[wpa3_sae]") ESP_LOGI("SAE Test", "=========== Complete ============"); } -#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) - #endif /* CONFIG_WPA3_SAE */ diff --git a/examples/network/.build-test-rules.yml b/examples/network/.build-test-rules.yml index 925f2fae91..d47b6d458d 100644 --- a/examples/network/.build-test-rules.yml +++ b/examples/network/.build-test-rules.yml @@ -12,6 +12,6 @@ examples/network/simple_sniffer: temporary: true reason: target esp32c6 is not supported yet disable_test: - - if: IDF_TARGET in ["esp32c3", "esp32c2", "esp32s2", "esp32s3"] + - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3"] temporary: true - reason: not tested + reason: lack of runners diff --git a/examples/network/simple_sniffer/pytest_simple_sniffer.py b/examples/network/simple_sniffer/pytest_simple_sniffer.py index 1805c84fb5..e78e8e8663 100644 --- a/examples/network/simple_sniffer/pytest_simple_sniffer.py +++ b/examples/network/simple_sniffer/pytest_simple_sniffer.py @@ -38,6 +38,8 @@ def _sniffer_packets_check(dut: Dut, channel: int, packet_num: int) -> None: @pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s3 @pytest.mark.wifi_ap @pytest.mark.parametrize('config', [ 'mem', diff --git a/examples/protocols/.build-test-rules.yml b/examples/protocols/.build-test-rules.yml index e7cad835ff..21b8d081f8 100644 --- a/examples/protocols/.build-test-rules.yml +++ b/examples/protocols/.build-test-rules.yml @@ -1,57 +1,5 @@ # Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps -examples/protocols/asio/asio_chat: - disable: - - if: IDF_TARGET == "esp32c2" - temporary: true - reason: target esp32c2 is not supported yet - disable_test: - - if: IDF_TARGET in ["esp32c3", "esp32s2", "esp32s3"] - temporary: true - reason: lack of runners - -examples/protocols/asio/async_request: - enable: - - if: IDF_TARGET == "esp32" - temporary: true - reason: the other targets are not tested yet - -examples/protocols/asio/socks4: - enable: - - if: IDF_TARGET == "esp32" or IDF_TARGET == "esp32s2" - temporary: true - reason: the other targets are not tested yet - -examples/protocols/asio/ssl_client_server: - disable: - - if: IDF_TARGET == "esp32c2" - temporary: true - reason: target esp32c2 is not supported yet - disable_test: - - if: IDF_TARGET in ["esp32s2", "esp32s3"] - temporary: true - reason: lack of runners - -examples/protocols/asio/tcp_echo_server: - disable: - - if: IDF_TARGET == "esp32c2" - temporary: true - reason: target esp32c2 is not supported yet - disable_test: - - if: IDF_TARGET in ["esp32c3", "esp32s2", "esp32s3"] - temporary: true - reason: lack of runners - -examples/protocols/asio/udp_echo_server: - disable: - - if: IDF_TARGET == "esp32c2" - temporary: true - reason: target esp32c2 is not supported yet - disable_test: - - if: IDF_TARGET in ["esp32c3", "esp32s2", "esp32s3"] - temporary: true - reason: lack of runners - examples/protocols/coap_client: disable: - if: IDF_TARGET == "esp32c6" @@ -78,6 +26,10 @@ examples/protocols/esp_local_ctrl: - if: IDF_TARGET == "esp32c6" temporary: true reason: target esp32c6 is not supported yet + disable_test: + - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3"] + temporary: true + reason: lack of runners examples/protocols/http2_request: disable: @@ -96,6 +48,22 @@ examples/protocols/http_server: - if: IDF_TARGET == "esp32c2" or IDF_TARGET == "esp32c6" temporary: true reason: target(s) not supported yet + disable_test: + - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3"] + temporary: true + reason: lack of runners + +examples/protocols/http_server/captive_portal: + disable_test: + - if: IDF_TARGET != "esp32" + temporary: true + reason: only test on esp32 + +examples/protocols/http_server/ws_echo_server: + disable_test: + - if: IDF_TARGET != "esp32" + temporary: true + reason: only test on esp32 examples/protocols/https_mbedtls: disable: @@ -119,7 +87,7 @@ examples/protocols/https_server/simple: temporary: true reason: target esp32c6 is not supported yet disable_test: - - if: IDF_TARGET == "esp32c2" + - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3"] temporary: true reason: lack of runners @@ -129,9 +97,9 @@ examples/protocols/https_server/wss_server: temporary: true reason: target esp32c6 is not supported yet disable_test: - - if: IDF_TARGET == "esp32c2" + - if: IDF_TARGET != "esp32" temporary: true - reason: lack of runners + reason: only test on esp32 examples/protocols/https_x509_bundle: disable: @@ -139,7 +107,7 @@ examples/protocols/https_x509_bundle: temporary: true reason: target esp32c6 is not supported yet disable_test: - - if: IDF_TARGET == "esp32c2" + - if: IDF_TARGET != "esp32" temporary: true reason: lack of runners @@ -149,7 +117,7 @@ examples/protocols/icmp_echo: temporary: true reason: target esp32c6 is not supported yet disable_test: - - if: IDF_TARGET == "esp32c2" + - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3"] temporary: true reason: lack of runners @@ -281,7 +249,7 @@ examples/protocols/sockets/tcp_client: temporary: true reason: target esp32c6 is not supported yet disable_test: - - if: IDF_TARGET != "esp32" + - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3"] temporary: true reason: lack of runners enable: @@ -299,7 +267,7 @@ examples/protocols/sockets/tcp_server: temporary: true reason: target esp32c6 is not supported yet disable_test: - - if: IDF_TARGET != "esp32" + - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3"] temporary: true reason: lack of runners @@ -315,7 +283,7 @@ examples/protocols/sockets/udp_client: temporary: true reason: target(s) not supported yet disable_test: - - if: IDF_TARGET in ["esp32c3", "esp32s2", "esp32s3"] + - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3"] temporary: true reason: lack of runners @@ -331,7 +299,7 @@ examples/protocols/sockets/udp_server: temporary: true reason: target esp32c6 is not supported yet disable_test: - - if: IDF_TARGET != "esp32" + - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3"] temporary: true reason: lack of runners diff --git a/examples/protocols/esp_local_ctrl/pytest_esp_local_ctrl.py b/examples/protocols/esp_local_ctrl/pytest_esp_local_ctrl.py index bdc984f226..44cc5e4858 100644 --- a/examples/protocols/esp_local_ctrl/pytest_esp_local_ctrl.py +++ b/examples/protocols/esp_local_ctrl/pytest_esp_local_ctrl.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 from __future__ import unicode_literals @@ -39,8 +39,9 @@ class CustomProcess(object): self.f.close() -@pytest.mark.supported_targets -@pytest.mark.temp_skip_ci(targets=['esp32c6'], reason='c6 support TBD') +@pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s3 @pytest.mark.wifi_router @pytest.mark.parametrize( 'config', diff --git a/examples/protocols/http_server/advanced_tests/pytest_http_server_advanced.py b/examples/protocols/http_server/advanced_tests/pytest_http_server_advanced.py index 65e8fabb23..79f031fe4f 100644 --- a/examples/protocols/http_server/advanced_tests/pytest_http_server_advanced.py +++ b/examples/protocols/http_server/advanced_tests/pytest_http_server_advanced.py @@ -34,7 +34,6 @@ from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32c3 -@pytest.mark.esp32s2 @pytest.mark.esp32s3 @pytest.mark.wifi_router def test_examples_protocol_http_server_advanced(dut: Dut) -> None: diff --git a/examples/protocols/http_server/captive_portal/README.md b/examples/protocols/http_server/captive_portal/README.md index 644b1b4b05..e0b1e77098 100644 --- a/examples/protocols/http_server/captive_portal/README.md +++ b/examples/protocols/http_server/captive_portal/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C3 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | # Captive Portal Example diff --git a/examples/protocols/http_server/captive_portal/pytest_captive_portal.py b/examples/protocols/http_server/captive_portal/pytest_captive_portal.py index 4db106cbac..7f9bfe1d8b 100644 --- a/examples/protocols/http_server/captive_portal/pytest_captive_portal.py +++ b/examples/protocols/http_server/captive_portal/pytest_captive_portal.py @@ -69,9 +69,6 @@ def test_captive_page(ip: str, port: str, uri: str) -> bool: @pytest.mark.esp32 -@pytest.mark.esp32c3 -@pytest.mark.esp32s2 -@pytest.mark.esp32s3 @pytest.mark.wifi_wlan @pytest.mark.xfail(reason='Runner unable to connect to target over WiFi', run=False) def test_example_captive_portal(dut: Dut) -> None: diff --git a/examples/protocols/http_server/file_serving/pytest_http_server_file_serving.py b/examples/protocols/http_server/file_serving/pytest_http_server_file_serving.py index ce89f3877f..bfeac574a6 100644 --- a/examples/protocols/http_server/file_serving/pytest_http_server_file_serving.py +++ b/examples/protocols/http_server/file_serving/pytest_http_server_file_serving.py @@ -22,7 +22,6 @@ from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32c3 -@pytest.mark.esp32s2 @pytest.mark.esp32s3 @pytest.mark.parametrize('config', ['spiffs',], indirect=True) def test_examples_protocol_http_server_file_serving(dut: Dut) -> None: diff --git a/examples/protocols/http_server/persistent_sockets/pytest_http_server_persistence.py b/examples/protocols/http_server/persistent_sockets/pytest_http_server_persistence.py index efd15fb1b8..9d19d77f20 100644 --- a/examples/protocols/http_server/persistent_sockets/pytest_http_server_persistence.py +++ b/examples/protocols/http_server/persistent_sockets/pytest_http_server_persistence.py @@ -25,7 +25,6 @@ from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32c3 -@pytest.mark.esp32s2 @pytest.mark.esp32s3 @pytest.mark.wifi_router def test_examples_protocol_http_server_persistence(dut: Dut) -> None: diff --git a/examples/protocols/http_server/simple/pytest_http_server_simple.py b/examples/protocols/http_server/simple/pytest_http_server_simple.py index eb5d8a95b4..4bab53fa76 100644 --- a/examples/protocols/http_server/simple/pytest_http_server_simple.py +++ b/examples/protocols/http_server/simple/pytest_http_server_simple.py @@ -57,7 +57,6 @@ class http_client_thread(threading.Thread): @pytest.mark.esp32 @pytest.mark.esp32c3 -@pytest.mark.esp32s2 @pytest.mark.esp32s3 @pytest.mark.wifi_router def test_examples_protocol_http_server_simple(dut: Dut) -> None: @@ -131,7 +130,6 @@ def test_examples_protocol_http_server_simple(dut: Dut) -> None: @pytest.mark.esp32 @pytest.mark.esp32c3 -@pytest.mark.esp32s2 @pytest.mark.esp32s3 @pytest.mark.wifi_router def test_examples_protocol_http_server_lru_purge_enable(dut: Dut) -> None: diff --git a/examples/protocols/http_server/ws_echo_server/README.md b/examples/protocols/http_server/ws_echo_server/README.md index 7b18fd9ffa..59f8a85401 100644 --- a/examples/protocols/http_server/ws_echo_server/README.md +++ b/examples/protocols/http_server/ws_echo_server/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C3 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | # Websocket echo server diff --git a/examples/protocols/http_server/ws_echo_server/pytest_ws_server_example.py b/examples/protocols/http_server/ws_echo_server/pytest_ws_server_example.py index b387c92a52..9dd1bf4c49 100644 --- a/examples/protocols/http_server/ws_echo_server/pytest_ws_server_example.py +++ b/examples/protocols/http_server/ws_echo_server/pytest_ws_server_example.py @@ -49,9 +49,6 @@ class WsClient: @pytest.mark.esp32 -@pytest.mark.esp32c3 -@pytest.mark.esp32s2 -@pytest.mark.esp32s3 @pytest.mark.wifi_router def test_examples_protocol_http_ws_echo_server(dut: Dut) -> None: # Get binary file diff --git a/examples/protocols/https_server/simple/pytest_https_server_simple.py b/examples/protocols/https_server/simple/pytest_https_server_simple.py index 0d7967dab4..86aa6a3f42 100644 --- a/examples/protocols/https_server/simple/pytest_https_server_simple.py +++ b/examples/protocols/https_server/simple/pytest_https_server_simple.py @@ -92,7 +92,6 @@ success_response = '

Hello Secure World!

' @pytest.mark.esp32 @pytest.mark.esp32c3 -@pytest.mark.esp32s2 @pytest.mark.esp32s3 @pytest.mark.wifi_router def test_examples_protocol_https_server_simple(dut: Dut) -> None: @@ -172,7 +171,6 @@ def test_examples_protocol_https_server_simple(dut: Dut) -> None: @pytest.mark.esp32 @pytest.mark.esp32c3 -@pytest.mark.esp32s2 @pytest.mark.esp32s3 @pytest.mark.wifi_router @pytest.mark.parametrize('config', ['dynamic_buffer',], indirect=True) diff --git a/examples/protocols/https_server/wss_server/pytest_https_wss_server.py b/examples/protocols/https_server/wss_server/pytest_https_wss_server.py index 824c22c598..9f6dd4de75 100644 --- a/examples/protocols/https_server/wss_server/pytest_https_wss_server.py +++ b/examples/protocols/https_server/wss_server/pytest_https_wss_server.py @@ -107,9 +107,6 @@ def test_multiple_client_keep_alive_and_async_response(ip, port, ca_file): # ty @pytest.mark.esp32 -@pytest.mark.esp32c3 -@pytest.mark.esp32s2 -@pytest.mark.esp32s3 @pytest.mark.wifi_router def test_examples_protocol_https_wss_server(dut: Dut) -> None: diff --git a/examples/protocols/https_x509_bundle/pytest_https_x509_bundle.py b/examples/protocols/https_x509_bundle/pytest_https_x509_bundle.py index 0553540225..12ef0d1f1d 100644 --- a/examples/protocols/https_x509_bundle/pytest_https_x509_bundle.py +++ b/examples/protocols/https_x509_bundle/pytest_https_x509_bundle.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 import logging import os @@ -9,9 +9,6 @@ from pytest_embedded import Dut @pytest.mark.esp32 -@pytest.mark.esp32c3 -@pytest.mark.esp32s2 -@pytest.mark.esp32s3 @pytest.mark.ethernet def test_examples_protocol_https_x509_bundle(dut: Dut) -> None: """ @@ -39,9 +36,6 @@ def test_examples_protocol_https_x509_bundle(dut: Dut) -> None: @pytest.mark.esp32 -@pytest.mark.esp32c3 -@pytest.mark.esp32s2 -@pytest.mark.esp32s3 @pytest.mark.ethernet @pytest.mark.parametrize('config', ['ssldyn',], indirect=True) def test_examples_protocol_https_x509_bundle_dynamic_buffer(dut: Dut) -> None: diff --git a/examples/protocols/icmp_echo/pytest_icmp_echo.py b/examples/protocols/icmp_echo/pytest_icmp_echo.py index c8172594f0..ccd331f2f4 100644 --- a/examples/protocols/icmp_echo/pytest_icmp_echo.py +++ b/examples/protocols/icmp_echo/pytest_icmp_echo.py @@ -10,7 +10,6 @@ from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32c3 -@pytest.mark.esp32s2 @pytest.mark.esp32s3 @pytest.mark.wifi_ap def test_protocols_icmp_echo(dut: Dut) -> None: diff --git a/examples/protocols/sockets/tcp_client/pytest_tcp_client.py b/examples/protocols/sockets/tcp_client/pytest_tcp_client.py index 8408f5f162..6eaf0ba533 100644 --- a/examples/protocols/sockets/tcp_client/pytest_tcp_client.py +++ b/examples/protocols/sockets/tcp_client/pytest_tcp_client.py @@ -22,6 +22,8 @@ PORT = 3333 @pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s3 @pytest.mark.wifi_router def test_examples_tcp_client_ipv4(dut: Dut) -> None: # Parse IP address of STA @@ -44,6 +46,8 @@ def test_examples_tcp_client_ipv4(dut: Dut) -> None: @pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s3 @pytest.mark.wifi_router def test_examples_tcp_client_ipv6(dut: Dut) -> None: # Parse IP address of STA diff --git a/examples/protocols/sockets/tcp_server/pytest_tcp_server.py b/examples/protocols/sockets/tcp_server/pytest_tcp_server.py index 35af88a523..0dd265101a 100644 --- a/examples/protocols/sockets/tcp_server/pytest_tcp_server.py +++ b/examples/protocols/sockets/tcp_server/pytest_tcp_server.py @@ -22,6 +22,8 @@ MESSAGE = 'Data to ESP' @pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s3 @pytest.mark.wifi_router def test_examples_tcp_server_ipv4(dut: Dut) -> None: # Parse IP address of STA @@ -44,6 +46,8 @@ def test_examples_tcp_server_ipv4(dut: Dut) -> None: @pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s3 @pytest.mark.wifi_router def test_examples_tcp_server_ipv6(dut: Dut) -> None: # Parse IP address of STA diff --git a/examples/protocols/sockets/udp_client/pytest_udp_client.py b/examples/protocols/sockets/udp_client/pytest_udp_client.py index fa6d7e4f59..1701690572 100644 --- a/examples/protocols/sockets/udp_client/pytest_udp_client.py +++ b/examples/protocols/sockets/udp_client/pytest_udp_client.py @@ -24,6 +24,8 @@ MAX_RETRIES = 3 @pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s3 @pytest.mark.wifi_router def test_examples_udp_client_ipv4(dut: Dut) -> None: # Parse IP address of STA @@ -53,6 +55,8 @@ def test_examples_udp_client_ipv4(dut: Dut) -> None: @pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s3 @pytest.mark.wifi_router def test_examples_udp_client_ipv6(dut: Dut) -> None: # Parse IP address of STA diff --git a/examples/protocols/sockets/udp_server/pytest_udp_server.py b/examples/protocols/sockets/udp_server/pytest_udp_server.py index addea4b883..623a3d3a58 100644 --- a/examples/protocols/sockets/udp_server/pytest_udp_server.py +++ b/examples/protocols/sockets/udp_server/pytest_udp_server.py @@ -22,6 +22,8 @@ MAX_RETRIES = 3 @pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s3 @pytest.mark.wifi_router def test_examples_udp_server_ipv4(dut: Dut) -> None: # Parse IP address of STA @@ -48,6 +50,8 @@ def test_examples_udp_server_ipv4(dut: Dut) -> None: @pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s3 @pytest.mark.wifi_router def test_examples_udp_server_ipv6(dut: Dut) -> None: # Parse IP address of STA diff --git a/examples/wifi/.build-test-rules.yml b/examples/wifi/.build-test-rules.yml index 4191e328ca..867f77d0f2 100644 --- a/examples/wifi/.build-test-rules.yml +++ b/examples/wifi/.build-test-rules.yml @@ -18,7 +18,7 @@ examples/wifi/getting_started: temporary: true reason: target esp32c6 is not supported yet disable_test: - - if: IDF_TARGET != "esp32" + - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32c2", "esp32s3"] temporary: true reason: lack of runners diff --git a/examples/wifi/getting_started/pytest_wifi_getting_started.py b/examples/wifi/getting_started/pytest_wifi_getting_started.py index 5e095d27dc..8761adf282 100644 --- a/examples/wifi/getting_started/pytest_wifi_getting_started.py +++ b/examples/wifi/getting_started/pytest_wifi_getting_started.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import os.path @@ -22,6 +22,8 @@ from pytest_embedded_idf.dut import IdfDut @pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.esp32s3 @pytest.mark.wifi_two_dut @pytest.mark.parametrize( 'count, app_path', [ @@ -42,3 +44,27 @@ def test_wifi_getting_started(dut: Tuple[IdfDut, IdfDut]) -> None: station.expect(f'{tag}: got ip:', timeout=60) station.expect(f'{tag}: connected to ap SSID:{ssid} password:{password}', timeout=60) softap.expect('station .+ join, AID=', timeout=60) + + +@pytest.mark.esp32c2 +@pytest.mark.wifi_two_dut +@pytest.mark.xtal_26mhz +@pytest.mark.parametrize( + 'count, config, baud, app_path', [ + (2, 'esp32c2_xtal26m', '74880', + f'{os.path.join(os.path.dirname(__file__), "softAP")}|{os.path.join(os.path.dirname(__file__), "station")}'), + ], indirect=True +) +def test_wifi_getting_started_esp32c2_xtal_26mhz(dut: Tuple[IdfDut, IdfDut]) -> None: + softap = dut[0] + station = dut[1] + + ssid = softap.app.sdkconfig.get('ESP_WIFI_SSID') + password = softap.app.sdkconfig.get('ESP_WIFI_PASSWORD') + assert station.app.sdkconfig.get('ESP_WIFI_SSID') == ssid + assert station.app.sdkconfig.get('ESP_WIFI_PASSWORD') == password + + tag = 'wifi station' + station.expect(f'{tag}: got ip:', timeout=60) + station.expect(f'{tag}: connected to ap SSID:{ssid} password:{password}', timeout=60) + softap.expect('station .+ join, AID=', timeout=60) diff --git a/examples/wifi/getting_started/softAP/sdkconfig.ci.esp32c2_xtal26m b/examples/wifi/getting_started/softAP/sdkconfig.ci.esp32c2_xtal26m new file mode 100644 index 0000000000..172f022b67 --- /dev/null +++ b/examples/wifi/getting_started/softAP/sdkconfig.ci.esp32c2_xtal26m @@ -0,0 +1,2 @@ +CONFIG_IDF_TARGET="esp32c2" +CONFIG_XTAL_FREQ_26=y diff --git a/examples/wifi/getting_started/station/sdkconfig.ci.esp32c2_xtal26m b/examples/wifi/getting_started/station/sdkconfig.ci.esp32c2_xtal26m new file mode 100644 index 0000000000..172f022b67 --- /dev/null +++ b/examples/wifi/getting_started/station/sdkconfig.ci.esp32c2_xtal26m @@ -0,0 +1,2 @@ +CONFIG_IDF_TARGET="esp32c2" +CONFIG_XTAL_FREQ_26=y diff --git a/tools/test_apps/.build-test-rules.yml b/tools/test_apps/.build-test-rules.yml index 8aa351709a..fe260713ce 100644 --- a/tools/test_apps/.build-test-rules.yml +++ b/tools/test_apps/.build-test-rules.yml @@ -33,9 +33,7 @@ tools/test_apps/peripherals/usb: tools/test_apps/phy/phy_multi_init_data_test: disable: - - if: IDF_TARGET == "esp32c2" or IDF_TARGET == "esp32c6" - temporary: true - reason: target(s) not supported yet + - if: SOC_WIFI_SUPPORTED != 1 tools/test_apps/protocols/esp_netif/build_config: enable: diff --git a/tools/test_apps/phy/phy_multi_init_data_test/README.md b/tools/test_apps/phy/phy_multi_init_data_test/README.md index 497a93ba72..7e7523ec85 100644 --- a/tools/test_apps/phy/phy_multi_init_data_test/README.md +++ b/tools/test_apps/phy/phy_multi_init_data_test/README.md @@ -1,2 +1,2 @@ -| Supported Targets | ESP32 | ESP32-C3 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | diff --git a/tools/test_apps/phy/phy_multi_init_data_test/pytest_phy_multi_init_data.py b/tools/test_apps/phy/phy_multi_init_data_test/pytest_phy_multi_init_data.py index 5fabfa9fb0..030bb96500 100644 --- a/tools/test_apps/phy/phy_multi_init_data_test/pytest_phy_multi_init_data.py +++ b/tools/test_apps/phy/phy_multi_init_data_test/pytest_phy_multi_init_data.py @@ -5,11 +5,7 @@ import pytest from pytest_embedded_idf.dut import IdfDut -# IDF-5046 -@pytest.mark.esp32 -@pytest.mark.esp32s2 -@pytest.mark.esp32s3 -@pytest.mark.esp32c3 +@pytest.mark.supported_targets @pytest.mark.generic @pytest.mark.parametrize('config', [ 'phy_multiple_init_data',