fix: pytest did not recognize test cases

This commit is contained in:
luaijun
2025-04-18 11:15:12 +08:00
parent a4401e5256
commit cd7d6f1c12
10 changed files with 42 additions and 52 deletions

View File

@ -335,7 +335,7 @@ pytest_examples_esp32c3eco7_wifi_ap:
needs:
- job: build_pytest_examples_esp32c3
artifacts: false
tags: [ esp32c3eco7, wifi_ap ,esp32c3]
tags: [ wifi_ap_eco ,esp32c3]
pytest_examples_esp32s3_wifi_ap:
extends:
@ -380,7 +380,7 @@ pytest_examples_esp32c2eco4_26m_wifi_ap:
needs:
- job: build_pytest_examples_esp32c2
artifacts: false
tags: [ esp32c2eco4, wifi_ap, xtal_26mhz ,esp32c2 ]
tags: [ wifi_ap_eco, xtal_26mhz , esp32c2]
pytest_examples_esp32c6_wifi_ap:
extends:
@ -544,7 +544,7 @@ pytest_examples_esp32c3eco7_wifi_two_dut:
needs:
- job: build_pytest_examples_esp32c3
artifacts: false
tags: [ esp32c3eco7, wifi_two_dut, esp32c3 ]
tags: [ wifi_two_dut_eco, esp32c3 ]
pytest_examples_esp32s3_wifi_two_dut:
extends:
@ -571,7 +571,7 @@ pytest_examples_esp32c2eco4_wifi_two_dut:
needs:
- job: build_pytest_examples_esp32c2
artifacts: false
tags: [ esp32c2eco4, wifi_two_dut, xtal_26mhz , esp32c2]
tags: [ wifi_two_dut_eco, xtal_26mhz , esp32c2]
pytest_examples_esp32c3_flash_encryption:
extends:
@ -1498,7 +1498,7 @@ pytest_test_apps_esp32c2eco4_generic:
needs:
- job: build_pytest_test_apps_esp32c2
artifacts: false
tags: [ esp32c2eco4, generic, xtal_26mhz , esp32c2]
tags: [ generic_eco, xtal_26mhz , esp32c2]
pytest_test_apps_esp32c3_generic:
extends:
@ -1516,7 +1516,7 @@ pytest_test_apps_esp32c3eco7_generic:
needs:
- job: build_pytest_test_apps_esp32c3
artifacts: false
tags: [ esp32c3eco7, generic , esp32c3]
tags: [ generic_eco , esp32c3]
pytest_test_apps_esp32c6_generic:
extends:
@ -1606,7 +1606,7 @@ pytest_test_apps_esp32c2eco4_wifi_two_dut:
needs:
- job: build_pytest_test_apps_esp32c2
artifacts: false
tags: [ esp32c2eco4, wifi_two_dut, xtal_26mhz, esp32c2 ]
tags: [ wifi_two_dut_eco, xtal_26mhz, esp32c2 ]
pytest_test_apps_esp32c3eco7_wifi_two_dut:
extends:
@ -1615,4 +1615,4 @@ pytest_test_apps_esp32c3eco7_wifi_two_dut:
needs:
- job: build_pytest_test_apps_esp32c3
artifacts: false
tags: [ esp32c3eco7, wifi_two_dut, esp32c3]
tags: [ wifi_two_dut_eco, esp32c3]

View File

@ -10,3 +10,5 @@ components/esp_wifi/test_apps/wifi_connect:
components/esp_wifi/test_apps/wifi_function:
disable:
- if: SOC_WIFI_SUPPORTED != 1
disable_test:
- if: SOC_WIFI_SUPPORTED != 1

View File

@ -28,13 +28,12 @@ def test_wifi_connect_cases_esp32c2_xtal26m(case_tester: CaseTester) -> None:
@pytest.mark.esp32c2
@pytest.mark.esp32c2eco4
@pytest.mark.wifi_two_dut
@pytest.mark.wifi_two_dut_eco
@pytest.mark.xtal_26mhz
@pytest.mark.parametrize(
'count, config, baud',
[
(2, 'esp32c2eco4_xtal26m', '74880'),
(2, 'esp32c2eco4_xtal26m', '74880'),
],
indirect=True,
)
@ -43,12 +42,11 @@ def test_wifi_connect_cases_esp32c2eco4_xtal26m(case_tester: CaseTester) -> None
@pytest.mark.esp32c3
@pytest.mark.wifi_two_dut
@pytest.mark.esp32c3eco7
@pytest.mark.wifi_two_dut_eco
@pytest.mark.parametrize(
'count, config',
[
(2, 'esp32c3eco7',),
(2, 'esp32c3eco7'),
],
indirect=True,
)

View File

@ -17,6 +17,7 @@ def test_wifi_unit_test(dut: Dut) -> None:
@pytest.mark.esp32c2
@pytest.mark.xtal_26mhz
@pytest.mark.generic
@pytest.mark.parametrize(
'config, baud',
[
@ -29,13 +30,12 @@ def test_wifi_connect_cases_esp32c2_xtal26m(dut: Dut) -> None:
@pytest.mark.esp32c2
@pytest.mark.esp32c2eco4
@pytest.mark.xtal_26mhz
@pytest.mark.generic
@pytest.mark.generic_eco
@pytest.mark.parametrize(
'config, target, baud',
'config, baud',
[
('esp32c2eco4_xtal26m', 'esp32c2', '74880'),
('esp32c2eco4_xtal26m', '74880'),
],
indirect=True,
)
@ -44,12 +44,11 @@ def test_wifi_unit_test_esp32c2eco4_xtal26m(dut: Dut) -> None:
@pytest.mark.esp32c3
@pytest.mark.esp32c3eco7
@pytest.mark.generic
@pytest.mark.generic_eco
@pytest.mark.parametrize(
'config, target',
'config',
[
('esp32c3eco7','esp32c3')
('esp32c3eco7')
],
indirect=True,
)

View File

@ -32,8 +32,7 @@ def test_wpa_supplicant_ut_offchan(case_tester: CaseTester) -> None:
@pytest.mark.esp32c2
@pytest.mark.wifi_two_dut
@pytest.mark.esp32c2eco4
@pytest.mark.wifi_two_dut_eco
@pytest.mark.xtal_26mhz
@pytest.mark.parametrize(
'count, config, baud',
@ -53,10 +52,9 @@ def test_wpa_supplicant_esp32c2eco4_xtal26mhz(case_tester: CaseTester) -> None:
@pytest.mark.esp32c3
@pytest.mark.wifi_two_dut
@pytest.mark.esp32c3eco7
@pytest.mark.wifi_two_dut_eco
@pytest.mark.parametrize(
'count, config,',
'count, config',
[
(
2,

View File

@ -63,12 +63,11 @@ def test_power_save_conn_esp32c2_26mhz(dut: Tuple[IdfDut, IdfDut]) -> None:
# Case 2: BLE power save test for ESP32C2ECO4
@pytest.mark.wifi_two_dut
@pytest.mark.xtal_26mhz
@pytest.mark.esp32c2
@pytest.mark.esp32c2eco4
@pytest.mark.wifi_two_dut_eco
@pytest.mark.xtal_26mhz
@pytest.mark.parametrize(
'config, count, app_path, baud',
'config, count, app_path, baud,',
[
(
'esp32c2eco4_xtal26m',
@ -94,9 +93,8 @@ def test_power_save_conn_esp32c2eco4(dut: Tuple[IdfDut, IdfDut]) -> None:
# Case 2: BLE power save test for ESP32C3ECO7
@pytest.mark.wifi_two_dut
@pytest.mark.esp32c3
@pytest.mark.esp32c3eco7
@pytest.mark.wifi_two_dut_eco
@pytest.mark.parametrize(
'config, count, app_path',
[

View File

@ -70,9 +70,8 @@ def test_wifi_getting_started_esp32c2_xtal_26mhz(dut: Tuple[IdfDut, IdfDut]) ->
softap.expect('station .+ join, AID=', timeout=60)
@pytest.mark.wifi_two_dut
@pytest.mark.wifi_two_dut_eco
@pytest.mark.xtal_26mhz
@pytest.mark.esp32c2eco4
@pytest.mark.esp32c2
@pytest.mark.parametrize(
'count, config, baud, app_path',
@ -102,8 +101,7 @@ def test_wifi_getting_started_esp32c2eco4_xtal_26mhz(dut: Tuple[IdfDut, IdfDut])
softap.expect('station .+ join, AID=', timeout=60)
@pytest.mark.wifi_two_dut
@pytest.mark.esp32c3eco7
@pytest.mark.wifi_two_dut_eco
@pytest.mark.esp32c3
@pytest.mark.parametrize(
'count, config, app_path',

View File

@ -76,14 +76,13 @@ def test_wifi_power_save_esp32c2_26mhz(dut: Dut) -> None:
_run_test(dut)
@pytest.mark.wifi_ap
@pytest.mark.wifi_ap_eco
@pytest.mark.xtal_26mhz
@pytest.mark.esp32c2
@pytest.mark.esp32c2eco4
@pytest.mark.parametrize(
'config, baud',
[
('c2eco4_xtal26m', '74880',),
('c2eco4_xtal26m', '74880'),
],
indirect=True,
)
@ -91,13 +90,12 @@ def test_wifi_power_save_esp32c2eco4_26mhz(dut: Dut) -> None:
_run_test(dut)
@pytest.mark.wifi_ap
@pytest.mark.wifi_ap_eco
@pytest.mark.esp32c3
@pytest.mark.esp32c3eco7
@pytest.mark.parametrize(
'config',
[
('c3eco7',)
('c3eco7')
],
indirect=True,
)

View File

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
"""
Pytest Related Constants. Don't import third-party packages here.
@ -106,8 +106,9 @@ ENV_MARKERS = {
'twai_network': 'multiple runners form a TWAI network.',
'sdio_master_slave': 'Test sdio multi board.',
'usj_device': 'Test usb_serial_jtag and usb_serial_jtag is used as serial only (not console)',
'esp32c3eco7': 'esp32c3 major version(v1.1) chips',
'esp32c2eco4': 'esp32c2 major version(v2.0) chips',
'wifi_ap_eco': 'a wifi AP in the environment for major version chips',
'generic_eco': 'tests should be run on generic runners for major version chips',
'wifi_two_dut_eco': 'tests should be run on runners which has two wifi duts connected for major version chips',
}

View File

@ -191,10 +191,9 @@ def test_phy_tsens_coexist_c2_xtal26m(dut: Tuple[Dut, Dut]) -> None:
run_phy_tsens_test_with_light_sleep(dut)
@pytest.mark.wifi_two_dut
@pytest.mark.wifi_two_dut_eco
@pytest.mark.xtal_26mhz
@pytest.mark.esp32c2
@pytest.mark.esp32c2eco4
@pytest.mark.parametrize(
'count, config, baud',
[
@ -218,13 +217,12 @@ def test_phy_tsens_coexist_c2eco4_xtal26m(dut: Tuple[Dut, Dut]) -> None:
run_phy_tsens_test_with_light_sleep(dut)
@pytest.mark.wifi_two_dut
@pytest.mark.esp32c3eco7
@pytest.mark.wifi_two_dut_eco
@pytest.mark.esp32c3
@pytest.mark.parametrize(
'count, config,',
'count, config, ',
[
(2, 'c3_eco7',),
(2, 'c3_eco7', ),
],
indirect=True,
)