fix(ci): enable gpio, uart, ledc target tests on esp32p4

This commit is contained in:
Song Ruo Jing
2024-08-01 16:28:21 +08:00
parent 8d472cf779
commit d3c6c9ccb8
8 changed files with 18 additions and 19 deletions

View File

@ -1,10 +1,6 @@
# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps # Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps
components/esp_driver_gpio/test_apps: components/esp_driver_gpio/test_apps:
disable_test:
- if: IDF_TARGET == "esp32p4"
temporary: true
reason: test not pass, should be re-enable # TODO: IDF-8968
depends_components: depends_components:
- esp_driver_gpio - esp_driver_gpio

View File

@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@ -122,7 +122,7 @@ const int s_test_map[TEST_GPIO_PIN_COUNT] = {
#elif CONFIG_IDF_TARGET_ESP32P4 #elif CONFIG_IDF_TARGET_ESP32P4
// Has no input-only rtcio pins, all pins support pull-up/down // Has no input-only rtcio pins, all pins support pull-up/down
#define RTCIO_SUPPORT_PU_PD(num) 1 #define RTCIO_SUPPORT_PU_PD(num) 1
#define TEST_GPIO_PIN_COUNT 16 #define TEST_GPIO_PIN_COUNT 14
const int s_test_map[TEST_GPIO_PIN_COUNT] = { const int s_test_map[TEST_GPIO_PIN_COUNT] = {
GPIO_NUM_0, //GPIO0 GPIO_NUM_0, //GPIO0
GPIO_NUM_1, //GPIO1 GPIO_NUM_1, //GPIO1
@ -131,8 +131,8 @@ const int s_test_map[TEST_GPIO_PIN_COUNT] = {
GPIO_NUM_4, //GPIO4 GPIO_NUM_4, //GPIO4
GPIO_NUM_5, //GPIO5 GPIO_NUM_5, //GPIO5
GPIO_NUM_6, //GPIO6 GPIO_NUM_6, //GPIO6
GPIO_NUM_7, //GPIO7 // GPIO_NUM_7, //GPIO7 // Workaround: IO7 is pullup outside on ESP32P4 Core Board Runner
GPIO_NUM_8, //GPIO8 // GPIO_NUM_8, //GPIO8 // Workaround: IO8 is pullup outside on ESP32P4 Core Board Runner
GPIO_NUM_9, //GPIO9 GPIO_NUM_9, //GPIO9
GPIO_NUM_10, //GPIO10 GPIO_NUM_10, //GPIO10
GPIO_NUM_11, //GPIO11 GPIO_NUM_11, //GPIO11

View File

@ -10,7 +10,6 @@ CONFIGS = [
] ]
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='esp32p4 support TBD')
@pytest.mark.supported_targets @pytest.mark.supported_targets
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', CONFIGS, indirect=True) @pytest.mark.parametrize('config', CONFIGS, indirect=True)
@ -23,6 +22,7 @@ def test_gpio(dut: IdfDut) -> None:
@pytest.mark.esp32s3 @pytest.mark.esp32s3
@pytest.mark.esp32c6 @pytest.mark.esp32c6
@pytest.mark.esp32h2 @pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', CONFIGS, indirect=True) @pytest.mark.parametrize('config', CONFIGS, indirect=True)
def test_rtc_io(dut: IdfDut) -> None: def test_rtc_io(dut: IdfDut) -> None:

View File

@ -6,9 +6,5 @@ components/esp_driver_ledc/test_apps/ledc:
- if: IDF_TARGET == "esp32c5" - if: IDF_TARGET == "esp32c5"
temporary: true temporary: true
reason: build failed. track in IDFCI-2204 reason: build failed. track in IDFCI-2204
disable_test:
- if: IDF_TARGET == "esp32p4"
temporary: true
reason: test not pass, should be re-enable # TODO: IDF-8969
depends_components: depends_components:
- esp_driver_ledc - esp_driver_ledc

View File

@ -6,7 +6,7 @@ from pytest_embedded_idf import IdfDut
@pytest.mark.supported_targets @pytest.mark.supported_targets
@pytest.mark.temp_skip_ci(targets=['esp32s3', 'esp32p4'], reason='skip due to duplication with test_ledc_psram, p4 TBD') # TODO: IDF-8969 @pytest.mark.temp_skip_ci(targets=['esp32s3'], reason='skip due to duplication with test_ledc_psram')
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',

View File

@ -14,10 +14,6 @@ components/esp_driver_uart/test_apps/rs485:
components/esp_driver_uart/test_apps/uart: components/esp_driver_uart/test_apps/uart:
disable: disable:
- if: SOC_UART_SUPPORTED != 1 - if: SOC_UART_SUPPORTED != 1
disable_test:
- if: IDF_TARGET == "esp32p4"
temporary: true
reason: test not pass, should be re-enable # TODO: IDF-8971
depends_components: depends_components:
- esp_driver_uart - esp_driver_uart
- esp_driver_gpio - esp_driver_gpio

View File

@ -10,7 +10,11 @@
#include "driver/uart.h" #include "driver/uart.h"
#include "esp_log.h" #include "esp_log.h"
#include "esp_rom_gpio.h" #include "esp_rom_gpio.h"
#if SOC_LP_GPIO_MATRIX_SUPPORTED
#include "driver/lp_io.h" #include "driver/lp_io.h"
#include "driver/rtc_io.h"
#include "hal/rtc_io_ll.h"
#endif
#include "soc/uart_periph.h" #include "soc/uart_periph.h"
#include "soc/uart_pins.h" #include "soc/uart_pins.h"
#include "soc/soc_caps.h" #include "soc/soc_caps.h"
@ -469,6 +473,13 @@ TEST_CASE("uart int state restored after flush", "[uart]")
} else { } else {
// LP_UART // LP_UART
#if SOC_LP_GPIO_MATRIX_SUPPORTED #if SOC_LP_GPIO_MATRIX_SUPPORTED
// Need to route TX signal to RX signal with the help of LP_GPIO matrix, TX signal connect to the RX IO directly
// This means RX IO should also only use LP_GPIO matrix to connect the RX signal
// In case the selected RX IO is the LP UART IOMUX IO, and the IO has been configured to IOMUX function in the driver
// Do the following:
TEST_ESP_OK(rtc_gpio_iomux_func_sel(uart_rx, RTCIO_LL_PIN_FUNC));
const int uart_rx_signal = uart_periph_signal[uart_num].pins[SOC_UART_RX_PIN_IDX].signal;
TEST_ESP_OK(lp_gpio_connect_in_signal(uart_rx, uart_rx_signal, false));
TEST_ESP_OK(lp_gpio_connect_out_signal(uart_rx, uart_tx_signal, false, false)); TEST_ESP_OK(lp_gpio_connect_out_signal(uart_rx, uart_tx_signal, false, false));
#else #else
// The only way is to use loop back feature // The only way is to use loop back feature

View File

@ -15,7 +15,7 @@ input_argv = {
@pytest.mark.supported_targets @pytest.mark.supported_targets
@pytest.mark.temp_skip_ci(targets=['esp32s3', 'esp32p4'], reason='skip due to duplication with test_uart_single_dev_psram, p4 TBD') # TODO: IDF-8971 @pytest.mark.temp_skip_ci(targets=['esp32s3'], reason='skip due to duplication with test_uart_single_dev_psram')
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',