Skip to content

Commit 57a9e56

Browse files
authored
Merge pull request #24 from david-cermak/fix/hosted_target_tests
Add esp_hosted target tests
2 parents cab27e3 + 6c67584 commit 57a9e56

File tree

4 files changed

+54
-6
lines changed

4 files changed

+54
-6
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ jobs:
5353
- { app: 2sta, path: "examples/two_stations", bin: "build_esp32s3_s3" }
5454
- { app: slave, path: "examples/server", bin: "build_esp32c6_c6" }
5555
- { app: slave_1, path: "examples/server", bin: "build_esp32c6_c6_1" }
56+
- { app: esp_hosted, path: "examples/mqtt", bin: "build_esp32p4_hosted" }
57+
- { app: esp_hosted_slave, path: "examples/hosted_slave", bin: "build_esp32c6_hosted" }
5658

5759
runs-on: ubuntu-latest
5860
container: espressif/idf:${{ matrix.idf_ver }}
@@ -77,6 +79,13 @@ jobs:
7779
run: |
7880
. ${IDF_PATH}/export.sh
7981
pip install idf-component-manager idf-build-apps --upgrade
82+
if [ "${{matrix.example.app}}" == "esp_hosted_slave" ]; then
83+
idf.py create-project-from-example "espressif/esp_hosted:slave"
84+
rm slave/sdkconfig.ci.*
85+
mv slave/ ./components/esp_wifi_remote/${{matrix.example.path}}/
86+
export EXPECTED_WARNING="warning: the int symbol ESP_HOSTED"
87+
cp ./components/esp_wifi_remote/examples/sdkconfig.ci.hosted_slave ./components/esp_wifi_remote/${{matrix.example.path}}/sdkconfig.ci.hosted
88+
fi
8089
python $GITHUB_WORKSPACE/protocols/ci/build_apps.py ./components/esp_wifi_remote/${{matrix.example.path}} -vv --preserve-all
8190
cd ./components/esp_wifi_remote/${{matrix.example.path}}
8291
${GITHUB_WORKSPACE}/protocols/ci/clean_build_artifacts.sh `pwd`/${{matrix.example.bin}}
@@ -98,6 +107,7 @@ jobs:
98107
test_pair:
99108
- { p4: "build_esp32p4_p4", c6: "build_esp32c6_c6" }
100109
- { p4: "build_esp32p4_p4_1", c6: "build_esp32c6_c6_1" }
110+
- { p4: "build_esp32p4_hosted", c6: "build_esp32c6_hosted" }
101111
runs-on: [self-hosted, wifi-remote]
102112
container:
103113
image: python:3.7-buster
@@ -122,4 +132,4 @@ jobs:
122132
mv server/${{ matrix.test_pair.c6 }}/ server/build/
123133
unzip mqtt/artifacts.zip -d mqtt/
124134
mv mqtt/${{ matrix.test_pair.p4 }}/ mqtt/build/
125-
python -m pytest --log-cli-level DEBUG --target esp32p4,esp32c6
135+
python -m pytest --log-cli-level DEBUG --target esp32c6,esp32p4
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
CONFIG_IDF_TARGET="esp32p4"
2+
CONFIG_ESP_WIFI_SSID="local_mosquitto"
3+
CONFIG_ESP_WIFI_PASSWORD="local_mosquitto_password"
4+
CONFIG_ESP_WIFI_REMOTE_LIBRARY_EPPP=n
5+
CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED=y
6+
CONFIG_SLAVE_IDF_TARGET_ESP32C6=y
7+
CONFIG_ESP_HOSTED_GPIO_SLAVE_RESET_SLAVE=9
8+
CONFIG_ESP_HOSTED_PRIV_SDIO_PIN_CMD_SLOT_1=52
9+
CONFIG_ESP_HOSTED_PRIV_SDIO_PIN_CLK_SLOT_1=51
10+
CONFIG_ESP_HOSTED_PRIV_SDIO_PIN_D0_SLOT_1=50
11+
CONFIG_ESP_HOSTED_PRIV_SDIO_PIN_D1_4BIT_BUS_SLOT_1=49
12+
CONFIG_ESP_HOSTED_PRIV_SDIO_PIN_D2_4BIT_BUS_SLOT_1=48
13+
CONFIG_ESP_HOSTED_PRIV_SDIO_PIN_D3_4BIT_BUS_SLOT_1=47
14+
CONFIG_ESP_HOSTED_SDIO_GPIO_RESET_SLAVE=9

components/esp_wifi_remote/examples/pytest_eppp.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@
1010
@pytest.mark.parametrize(
1111
'count, app_path, target', [
1212
(2,
13-
f'{os.path.join(os.path.dirname(__file__), "mqtt")}|{os.path.join(os.path.dirname(__file__), "server")}',
14-
'esp32p4|esp32c6'),
13+
f'{os.path.join(os.path.dirname(__file__), "server")}|{os.path.join(os.path.dirname(__file__), "mqtt")}',
14+
'esp32c6|esp32p4'),
1515
], indirect=True
1616
)
1717
def test_wifi_remote_eppp(dut: Tuple[IdfDut, IdfDut]) -> None:
18-
client = dut[0]
19-
server = dut[1]
18+
server = dut[0]
19+
client = dut[1]
2020

21-
server.expect('rpc_server: Received WIFI event 4', timeout=100) # wifi station connected
21+
# Check for wifi station connected event (different for hosted and eppp)
22+
if dut[1].app.sdkconfig.get('ESP_WIFI_REMOTE_LIBRARY_HOSTED') is True:
23+
server.expect('slave_rpc: Sta mode connected', timeout=100)
24+
else:
25+
server.expect('rpc_server: Received WIFI event 4', timeout=100)
2226
client.expect('MQTT_EVENT_CONNECTED', timeout=100)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This file was generated using idf.py save-defconfig. It can be edited manually.
2+
# Espressif IoT Development Framework (ESP-IDF) 5.5.0 Project Minimal Configuration
3+
#
4+
CONFIG_IDF_TARGET="esp32c6"
5+
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
6+
CONFIG_PARTITION_TABLE_CUSTOM=y
7+
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.esp32c6.csv"
8+
CONFIG_ESP_HOST_DEV_BOARD_P4_FUNC_BOARD=y
9+
CONFIG_ESP_SDIO_PIN_CMD=18
10+
CONFIG_ESP_SDIO_PIN_CLK=19
11+
CONFIG_ESP_SDIO_PIN_D0=20
12+
CONFIG_ESP_SDIO_PIN_D1=21
13+
CONFIG_ESP_SDIO_PIN_D2=22
14+
CONFIG_ESP_SDIO_PIN_D3=23
15+
CONFIG_ESP_CACHE_MALLOC=n
16+
CONFIG_ESP_PKT_STATS=y
17+
CONFIG_BT_ENABLED=y
18+
CONFIG_BT_CONTROLLER_ONLY=y
19+
CONFIG_BT_LE_SLEEP_ENABLE=y
20+
CONFIG_FREERTOS_HZ=1000

0 commit comments

Comments
 (0)