Merge branch 'fix/p4_enable_generic_test' into 'master'

test(esp_driver_spi): enable single board test for esp32p4

Closes IDF-8942

See merge request espressif/esp-idf!31972
This commit is contained in:
Wan Lei 2024-07-12 14:07:31 +08:00
commit 602691e974
8 changed files with 18 additions and 24 deletions

View File

@ -16,6 +16,10 @@
#include "driver/spi_master.h"
#ifdef __cplusplus
extern "C" {
#endif
#if SOC_SPI_SCT_SUPPORTED
/**
* @Backgrounds: `SCT Mode`
@ -112,3 +116,7 @@ esp_err_t spi_device_queue_multi_trans(spi_device_handle_t handle, spi_multi_tra
*/
esp_err_t spi_device_get_multi_trans_result(spi_device_handle_t handle, spi_multi_transaction_t **seg_trans_desc, TickType_t ticks_to_wait);
#endif //#if SOC_SPI_SCT_SUPPORTED
#ifdef __cplusplus
}
#endif

View File

@ -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

View File

@ -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)
{

View File

@ -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',

View File

@ -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

View File

@ -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:

View File

@ -14,6 +14,7 @@
#include "soc/spi_periph.h"
#include "soc/lldesc.h"
#include "soc/soc_caps.h"
#include "soc/ext_mem_defs.h" //for SOC_NON_CACHEABLE_OFFSET
#include "hal/spi_slave_hd_hal.h"
#include "hal/assert.h"

View File

@ -81,6 +81,7 @@ components/esp_hw_support/include/esp_private/esp_riscv_intr.h
#
components/esp_coex/include/private/esp_coexist_adapter.h
components/esp_coex/include/esp_coex_i154.h
### To be fixed: headers that rely on implicit inclusion
#
components/esp_ringbuf/include/freertos/ringbuf.h
@ -122,4 +123,3 @@ components/riscv/include/riscv/rvruntime-frames.h
components/console/private_include/console_private.h
# Missing extern "C"
components/esp_driver_spi/include/esp_private/spi_master_internal.h