fix(esp_driver_spi): enable single board test for esp32p4

This commit is contained in:
wanlei
2024-07-08 20:32:04 +08:00
parent 1ad5d42dbb
commit f3968eb8fb
8 changed files with 18 additions and 24 deletions
@@ -9,10 +9,6 @@
components/esp_driver_spi/test_apps/master:
disable:
- if: SOC_GPSPI_SUPPORTED != 1
disable_test:
- if: IDF_TARGET == "esp32p4"
temporary: true
reason: not supported, no multi-dev runner # TODO: [ESP32P4] IDF-8942
<<: *spi_depends_default
components/esp_driver_spi/test_apps/param:
@@ -21,24 +17,16 @@ components/esp_driver_spi/test_apps/param:
disable_test:
- if: IDF_TARGET == "esp32p4"
temporary: true
reason: not supported, no multi-dev runner # TODO: [ESP32P4] IDF-8942
reason: no multi-dev runner # TODO: [ESP32P4] IDF-9517
<<: *spi_depends_default
components/esp_driver_spi/test_apps/slave:
disable:
- if: SOC_GPSPI_SUPPORTED != 1
disable_test:
- if: IDF_TARGET == "esp32p4"
temporary: true
reason: not supported, no multi-dev runner # TODO: [ESP32P4] IDF-8942
<<: *spi_depends_default
components/esp_driver_spi/test_apps/slave_hd:
disable:
- if: SOC_GPSPI_SUPPORTED != 1
- if: SOC_SPI_SUPPORT_SLAVE_HD_VER2 != 1
disable_test:
- if: IDF_TARGET == "esp32p4"
temporary: true
reason: not supported # TODO: IDF-8942
<<: *spi_depends_default
@@ -29,6 +29,7 @@ const static char TAG[] = "test_spi";
// There is no input-only pin except on esp32 and esp32s2
#define TEST_SOC_HAS_INPUT_ONLY_PINS (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#if !CONFIG_IDF_TARGET_ESP32P4 //TODO: IDF-8313
static void check_spi_pre_n_for(spi_clock_source_t clock_source, int clk, int pre, int n)
{
spi_device_handle_t handle;
@@ -176,6 +177,7 @@ TEST_CASE("SPI Master clockdiv calculation routines", "[spi]")
TEST_ESP_OK(spi_bus_free(TEST_SPI_HOST));
}
#endif // IDF-8313
static spi_device_handle_t setup_spi_bus_loopback(int clkspeed, bool dma)
{
@@ -1,12 +1,10 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
import pytest
# If `test_env` is define, should not run on generic runner
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 support TBD') # TODO: IDF-8942
@pytest.mark.supported_targets
@pytest.mark.esp32h2
@pytest.mark.generic
@pytest.mark.parametrize('config', ['defaults', 'release', 'freertos_compliance', 'freertos_flash',], indirect=True)
def test_master_single_dev(case_tester) -> None: # type: ignore
@@ -28,10 +26,9 @@ def test_master_esp_flash(case_tester) -> None: # type: ignore
# if `test_env` not defined, will run on `generic_multi_device` by default
# TODO: [ESP32P4] IDF-8942 [ESP32C5] IDF-10322
# TODO: [ESP32P4] IDF-9517 [ESP32C5] IDF-10322
@pytest.mark.temp_skip_ci(targets=['esp32p4', 'esp32c5'], reason='no multi-dev runner')
@pytest.mark.supported_targets
@pytest.mark.esp32h2
@pytest.mark.generic_multi_device
@pytest.mark.parametrize(
'count, config',
@@ -1,12 +1,10 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
import pytest
# If `test_env` is define, should not run on generic runner
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 support TBD') # TODO: IDF-8942
@pytest.mark.supported_targets
@pytest.mark.esp32h2
@pytest.mark.generic
@pytest.mark.parametrize('config', ['defaults',], indirect=True)
def test_slave_single_dev(case_tester) -> None: # type: ignore
@@ -17,10 +15,9 @@ def test_slave_single_dev(case_tester) -> None: # type: ignore
# if `test_env` not defined, will run on `generic_multi_device` by default
# TODO: [ESP32P4] IDF-8942 [ESP32C5] IDF-10322
# TODO: [ESP32P4] IDF-9517 [ESP32C5] IDF-10322
@pytest.mark.temp_skip_ci(targets=['esp32p4', 'esp32c5'], reason='no multi-dev runner')
@pytest.mark.supported_targets
@pytest.mark.esp32h2
@pytest.mark.generic_multi_device
@pytest.mark.parametrize('count, config', [(2, 'defaults'), (2, 'iram_safe')], indirect=True)
def test_slave_multi_dev(case_tester) -> None: # type: ignore
@@ -11,6 +11,7 @@ import pytest
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.generic
def test_slave_hd_single_dev(case_tester) -> None: # type: ignore
for case in case_tester.test_menu: