Skip to content

Commit

Permalink
Merge branch 'test/enable_i2c_test' into 'master'
Browse files Browse the repository at this point in the history
test(i2c): Enable all i2c test on esp32p4, esp32c5

Closes IDF-8960 and IDF-10307

See merge request espressif/esp-idf!33043
  • Loading branch information
mythbuster5 committed Aug 26, 2024
2 parents 227e35a + acda9ad commit 08fbc01
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
8 changes: 1 addition & 7 deletions components/driver/test_apps/.build-test-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,7 @@ components/driver/test_apps/legacy_adc_driver:

components/driver/test_apps/legacy_i2c_driver:
disable:
- if: IDF_TARGET in ["esp32c5", "esp32c61"]
temporary: true
reason: not support yet # TODO: [ESP32C5] IDF-10307, [ESP32C61] IDF-9296
disable_test:
- if: IDF_TARGET == "esp32p4"
temporary: true
reason: lack of runner
- if: SOC_I2C_SUPPORTED != 1
depends_filepatterns:
- components/driver/i2c/**
# Following dependency is needed because they might increase lazy installed memory
Expand Down
4 changes: 2 additions & 2 deletions components/driver/test_apps/legacy_i2c_driver/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | -------- |
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "hal/i2c_types.h"
#include "soc/uart_periph.h"
#include "test_utils.h"
#include "esp_private/gpio.h"

#define DATA_LENGTH 512 /*!<Data buffer length for test buffer*/
#define RW_TEST_LENGTH 129 /*!<Data length for r/w test, any value from 0-DATA_LENGTH*/
Expand Down Expand Up @@ -675,7 +676,7 @@ TEST_CASE("I2C general API test", "[i2c]")
//Init uart baud rate detection
static void uart_aut_baud_det_init(int rxd_io_num)
{
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[rxd_io_num], PIN_FUNC_GPIO);
gpio_func_sel(rxd_io_num, PIN_FUNC_GPIO);
gpio_set_direction(rxd_io_num, GPIO_MODE_INPUT_OUTPUT);
esp_rom_gpio_connect_out_signal(rxd_io_num, i2c_periph_signal[0].scl_out_sig, 0, 0);
esp_rom_gpio_connect_in_signal(rxd_io_num, UART_PERIPH_SIGNAL(1, SOC_UART_RX_PIN_IDX), 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


@pytest.mark.supported_targets
@pytest.mark.temp_skip_ci(targets=['esp32p4', 'esp32c5'], reason='esp32p4 support TBD, C5 failed') # TODO: IDF-8960, [ESP32C5] IDF-10307
@pytest.mark.generic
@pytest.mark.parametrize(
'config',
Expand All @@ -22,7 +21,9 @@ def test_i2c_legacy(dut: Dut) -> None:
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32c5
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.generic_multi_device
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ def test_i2c(dut: Dut) -> None:

@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.generic_multi_device
Expand Down

0 comments on commit 08fbc01

Please sign in to comment.