ci: update driver tests to use run_all_single_board_cases()

This commit is contained in:
Marius Vikhammer 2023-03-27 17:42:23 +08:00
parent 914bb81b95
commit f627506f6b
48 changed files with 31 additions and 45 deletions

View File

@ -20,9 +20,7 @@ from pytest_embedded import Dut
indirect=True,
)
def test_legacy_adc(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests')
dut.write('*')
dut.expect_unity_test_output(timeout=240)
dut.run_all_single_board_cases()
@pytest.mark.esp32c2
@ -36,6 +34,4 @@ def test_legacy_adc(dut: Dut) -> None:
indirect=True,
)
def test_legacy_adc_esp32c2_xtal_26mhz(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests')
dut.write('*')
dut.expect_unity_test_output(timeout=240)
dut.run_all_single_board_cases()

View File

@ -18,6 +18,4 @@ from pytest_embedded import Dut
indirect=True,
)
def test_legacy_mcpwm(dut: Dut) -> None:
dut.expect('Press ENTER to see the list of tests')
dut.write('*')
dut.expect_unity_test_output()
dut.run_all_single_board_cases()

View File

@ -19,6 +19,4 @@ from pytest_embedded import Dut
indirect=True,
)
def test_legacy_pcnt(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests')
dut.write('*')
dut.expect_unity_test_output(timeout=240)
dut.run_all_single_board_cases(timeout=240)

View File

@ -16,6 +16,4 @@ from pytest_embedded import Dut
'release',
], indirect=True)
def test_legacy_rmt(dut: Dut) -> None:
dut.expect('Press ENTER to see the list of tests')
dut.write('*')
dut.expect_unity_test_output(timeout=120)
dut.run_all_single_board_cases(timeout=120)

View File

@ -11,6 +11,4 @@ from pytest_embedded import Dut
'release',
], indirect=True)
def test_legacy_timer_driver(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests')
dut.write('*')
dut.expect_unity_test_output(timeout=120)
dut.run_all_single_board_cases(timeout=120)

View File

@ -19,6 +19,4 @@ from pytest_embedded import Dut
indirect=True,
)
def test_mcpwm(dut: Dut) -> None:
dut.expect('Press ENTER to see the list of tests')
dut.write('*')
dut.expect_unity_test_output()
dut.run_all_single_board_cases()

View File

@ -21,6 +21,4 @@ from pytest_embedded import Dut
indirect=True,
)
def test_rmt(dut: Dut) -> None:
dut.expect('Press ENTER to see the list of tests')
dut.write('*')
dut.expect_unity_test_output()
dut.run_all_single_board_cases()

View File

@ -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
from pytest_embedded import Dut
@ -14,6 +14,4 @@ from pytest_embedded import Dut
indirect=True,
)
def test_touch_sensor_v1(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests')
dut.write('*')
dut.expect_unity_test_output(timeout=60)
dut.run_all_single_board_cases(timeout=60)

View File

@ -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
from pytest_embedded import Dut
@ -15,6 +15,4 @@ from pytest_embedded import Dut
indirect=True,
)
def test_touch_sensor_v2(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests')
dut.write('*')
dut.expect_unity_test_output(timeout=120)
dut.run_all_single_board_cases(timeout=120)

View File

@ -24,9 +24,7 @@ from pytest_embedded import Dut
indirect=True,
)
def test_twai_self(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests')
dut.write('[twai-loop-back]')
dut.expect_unity_test_output()
dut.run_all_single_board_cases(group='twai-loop-back')
@pytest.fixture(name='socket_can', scope='module')

View File

@ -18,9 +18,7 @@ from pytest_embedded import Dut
'pm_enable'
], indirect=True)
def test_adc(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests')
dut.write('*')
dut.expect_unity_test_output(timeout=120)
dut.run_all_single_board_cases(timeout=120)
# No PM test, as C2 doesn't support ADC continuous mode
@ -36,6 +34,4 @@ def test_adc(dut: Dut) -> None:
indirect=True,
)
def test_adc_esp32c2_xtal_26mhz(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests')
dut.write('*')
dut.expect_unity_test_output(timeout=120)
dut.run_all_single_board_cases(timeout=120)

View File

@ -7,4 +7,6 @@ from pytest_embedded import Dut
@pytest.mark.linux
@pytest.mark.host_test
def test_esp_hw_support_linux(dut: Dut) -> None:
dut.run_all_single_board_cases()
dut.expect_exact('Press ENTER to see the list of tests')
dut.write('![ignore]')
dut.expect_unity_test_output(timeout=120)

View File

@ -1,6 +1,12 @@
# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps
components/esp_rom/test_apps/linux_rom_apis:
components/esp_rom/host_test/rom_test:
enable:
- if: IDF_TARGET == "linux"
reason: only test on linux
components/esp_rom/test_apps:
disable_test:
- if: IDF_TARGET in ["esp32", "esp32c2"]
temporary: false
reason: lack of memory for testing miniz compressing

View File

@ -7,4 +7,6 @@ from pytest_embedded import Dut
@pytest.mark.linux
@pytest.mark.host_test
def test_esp_system_linux(dut: Dut) -> None:
dut.run_all_single_board_cases()
dut.expect_exact('Press ENTER to see the list of tests.')
dut.write('*')
dut.expect_unity_test_output(timeout=10)

View File

@ -7,4 +7,6 @@ from pytest_embedded import Dut
@pytest.mark.linux
@pytest.mark.host_test
def test_heap_linux(dut: Dut) -> None:
dut.run_all_single_board_cases()
dut.expect_exact('Press ENTER to see the list of tests.')
dut.write('*')
dut.expect_unity_test_output(timeout=10)