CI: optimize wifi get started example test

pull/9811/merge
Chen Yudong 2022-10-13 18:32:28 +08:00
rodzic 8b6a7f01c0
commit c258ef705e
5 zmienionych plików z 14 dodań i 8 usunięć

Wyświetl plik

@ -199,13 +199,13 @@ example_test_pytest_esp32_flash_encryption:
- build_pytest_examples_esp32
tags: [ esp32, flash_encryption ]
example_test_pytest_esp32_multi_dut_generic:
example_test_pytest_esp32_wifi_two_dut:
extends:
- .pytest_examples_dir_template
- .rules:test:example_test-esp32
- .rules:test:example_test-esp32-wifi
needs:
- build_pytest_examples_esp32
tags: [ esp32, multi_dut_generic ]
tags: [ esp32, wifi_two_dut ]
example_test_pytest_esp32c3_flash_encryption:
extends:

Wyświetl plik

@ -22,7 +22,7 @@ from pytest_embedded_idf.dut import IdfDut
@pytest.mark.esp32
@pytest.mark.multi_dut_generic
@pytest.mark.wifi_two_dut
@pytest.mark.parametrize(
'count, app_path', [
(2,
@ -33,10 +33,12 @@ def test_wifi_getting_started(dut: Tuple[IdfDut, IdfDut]) -> None:
softap = dut[0]
station = dut[1]
ssid = 'myssid'
password = 'mypassword'
tag = 'wifi station'
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)

Wyświetl plik

@ -0,0 +1,2 @@
CONFIG_ESP_WIFI_SSID="ssid_${IDF_TARGET}_${CI_PIPELINE_ID}"
CONFIG_ESP_WIFI_PASSWORD="password_${IDF_TARGET}_${CI_PIPELINE_ID}"

Wyświetl plik

@ -0,0 +1,2 @@
CONFIG_ESP_WIFI_SSID="ssid_${IDF_TARGET}_${CI_PIPELINE_ID}"
CONFIG_ESP_WIFI_PASSWORD="password_${IDF_TARGET}_${CI_PIPELINE_ID}"

Wyświetl plik

@ -66,7 +66,7 @@ markers =
# multi-dut markers
i154_multi_dut: tests should be used for i154, such as openthread.
multi_dut_generic: tests should be run on generic runners, at least have two duts connected.
wifi_two_dut: tests should be run on runners which has two wifi duts connected.
generic_multi_device: generic multiple devices whose corresponding gpio pins are connected to each other.
# host_test markers