Skip to content

Commit 333e1ef

Browse files
authored
Merge pull request #400 from espressif/ci/spi_nand_flash
ci(spi_nand_flash): run example and test on hardware (IEC-180)
2 parents 692858b + c8fb264 commit 333e1ef

File tree

6 files changed

+28
-7
lines changed

6 files changed

+28
-7
lines changed

.github/get_idf_build_apps_args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def main():
2424
print(f' - {file}')
2525

2626
modified_components = set()
27-
excluded_dirs = ['.github', 'test_app']
27+
excluded_dirs = ['.github']
2828
for file in modified_files:
2929
toplevel = file.split('/')[0]
3030
if toplevel in excluded_dirs:

.github/workflows/build_and_run_apps.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ jobs:
107107
*/examples/*/build_esp*/*.bin
108108
*/examples/*/build_esp*/flasher_args.json
109109
*/examples/*/build_esp*/config/sdkconfig.json
110-
*/test_apps/**/build_esp*/bootloader/bootloader.bin
111-
*/test_apps/**/build_esp*/partition_table/partition-table.bin
112-
*/test_apps/**/build_esp*/*.bin
113-
*/test_apps/**/build_esp*/flasher_args.json
114-
*/test_apps/**/build_esp*/config/sdkconfig.json
110+
*/test_app*/**/build_esp*/bootloader/bootloader.bin
111+
*/test_app*/**/build_esp*/partition_table/partition-table.bin
112+
*/test_app*/**/build_esp*/*.bin
113+
*/test_app*/**/build_esp*/flasher_args.json
114+
*/test_app*/**/build_esp*/config/sdkconfig.json
115115
build_info*.json
116116
117117
run-target:
@@ -134,6 +134,9 @@ jobs:
134134
- runs-on: "ESP32-ETHERNET-KIT"
135135
marker: "ethernet"
136136
target: "esp32"
137+
- runs-on: "spi_nand_flash"
138+
marker: "spi_nand_flash"
139+
target: "esp32"
137140
env:
138141
TEST_RESULT_NAME: test_results_${{ matrix.runner.target }}_${{ matrix.runner.marker }}_${{ matrix.idf_ver }}
139142
TEST_RESULT_FILE: test_results_${{ matrix.runner.target }}_${{ matrix.runner.marker }}_${{ matrix.idf_ver }}.xml
@@ -155,7 +158,7 @@ jobs:
155158
run: |
156159
python3 .github/get_pytest_args.py --target=${{ matrix.runner.target }} -v 'build_info*.json' pytest-args.txt
157160
cat pytest-args.txt
158-
pytest --suppress-no-test-exit-code $(cat pytest-args.txt) --ignore-glob '*/managed_components/*' --ignore=test_app --ignore=.github --junit-xml=${{ env.TEST_RESULT_FILE }} --target=${{ matrix.runner.target }} -m ${{ matrix.runner.marker }} --build-dir=build_${{ matrix.runner.target }}
161+
pytest --suppress-no-test-exit-code $(cat pytest-args.txt) --ignore-glob '*/managed_components/*' --ignore=.github --junit-xml=${{ env.TEST_RESULT_FILE }} --target=${{ matrix.runner.target }} -m ${{ matrix.runner.marker }} --build-dir=build_${{ matrix.runner.target }}
159162
- name: Upload test results
160163
uses: actions/upload-artifact@v4
161164
if: always()

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ markers =
1212
# env markers
1313
generic: generic runner
1414
ethernet: ethernet runners
15+
spi_nand_flash: runner with SPI NAND flash connected
1516

1617
# log related
1718
log_cli = True
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import pytest
2+
3+
4+
@pytest.mark.spi_nand_flash
5+
def test_nand_flash_example(dut) -> None:
6+
dut.expect_exact("Opening file")
7+
dut.expect_exact("File written")
8+
dut.expect_exact("Reading file")
9+
dut.expect_exact("Read from file:")
10+
dut.expect_exact("Returned from app_main")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_EXAMPLE_FORMAT_IF_MOUNT_FAILED=y
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import pytest
2+
3+
4+
@pytest.mark.spi_nand_flash
5+
def test_spi_nand_flash(dut) -> None:
6+
dut.run_all_single_board_cases()

0 commit comments

Comments
 (0)