mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'fix/cd_input_sd_mode_fails' into 'master'
CI: sdcard tests fail fix Closes IDFCI-1700 See merge request espressif/esp-idf!23505
This commit is contained in:
commit
61e694d2f3
@ -8,4 +8,4 @@ import pytest
|
||||
@pytest.mark.sdio_master_slave
|
||||
@pytest.mark.parametrize('count', [2,], indirect=True)
|
||||
def test_sdio_multi_dev(case_tester) -> None: # type: ignore
|
||||
case_tester.run_all_multi_dev_cases(reset=True)
|
||||
case_tester.run_all_multi_dev_cases(reset=True, timeout=180)
|
||||
|
@ -44,14 +44,14 @@ static void test_teardown(void)
|
||||
TEST_ESP_OK(esp_vfs_fat_spiflash_unmount_rw_wl("/spiflash", s_test_wl_handle));
|
||||
}
|
||||
|
||||
TEST_CASE("(WL) can format partition", "[fatfs][wear_levelling]")
|
||||
TEST_CASE("(WL) can format partition", "[fatfs][wear_levelling][timeout=180]")
|
||||
{
|
||||
TEST_ESP_OK(esp_vfs_fat_spiflash_format_rw_wl("/spiflash", NULL));
|
||||
test_setup();
|
||||
test_teardown();
|
||||
}
|
||||
|
||||
TEST_CASE("(WL) can format when the FAT is mounted already", "[fatfs][wear_levelling]")
|
||||
TEST_CASE("(WL) can format when the FAT is mounted already", "[fatfs][wear_levelling][timeout=180]")
|
||||
{
|
||||
test_setup();
|
||||
TEST_ESP_OK(esp_vfs_fat_spiflash_format_rw_wl("/spiflash", NULL));
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
import pytest
|
||||
@ -20,7 +20,7 @@ def test_fatfs_flash_wl_generic(dut: Dut) -> None:
|
||||
dut.write('')
|
||||
dut.expect_exact('Enter test for running.')
|
||||
dut.write('*')
|
||||
dut.expect_unity_test_output(timeout=120)
|
||||
dut.expect_unity_test_output(timeout=180)
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@ -36,4 +36,4 @@ def test_fatfs_flash_wl_psram(dut: Dut) -> None:
|
||||
dut.write('')
|
||||
dut.expect_exact('Enter test for running.')
|
||||
dut.write('*')
|
||||
dut.expect_unity_test_output(timeout=120)
|
||||
dut.expect_unity_test_output(timeout=180)
|
||||
|
@ -578,13 +578,19 @@ static void test_cd_input(int gpio_cd_num, const sdmmc_host_t* config)
|
||||
|
||||
// Check that card initialization fails if CD is high
|
||||
REG_WRITE(GPIO_OUT_W1TS_REG, BIT(gpio_cd_num));
|
||||
usleep(1000);
|
||||
usleep(10000);
|
||||
TEST_ESP_ERR(ESP_ERR_NOT_FOUND, sdmmc_card_init(config, card));
|
||||
|
||||
// Check that card initialization succeeds if CD is low
|
||||
REG_WRITE(GPIO_OUT_W1TC_REG, BIT(gpio_cd_num));
|
||||
usleep(1000);
|
||||
TEST_ESP_OK(sdmmc_card_init(config, card));
|
||||
usleep(10000);
|
||||
esp_err_t err = sdmmc_card_init(config, card);
|
||||
if (err != ESP_OK) {
|
||||
usleep(10000);
|
||||
// Try again, in case the card was not ready yet
|
||||
err = sdmmc_card_init(config, card);
|
||||
}
|
||||
TEST_ESP_OK(err);
|
||||
|
||||
free(card);
|
||||
}
|
||||
@ -631,6 +637,7 @@ TEST_CASE("CD input works in SD mode", "[sd][test_env=UT_T1_SDMODE]")
|
||||
sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
|
||||
slot_config.gpio_cd = CD_WP_TEST_GPIO;
|
||||
TEST_ESP_OK(sdmmc_host_init());
|
||||
usleep(10000);
|
||||
TEST_ESP_OK(sdmmc_host_init_slot(SDMMC_HOST_SLOT_1, &slot_config));
|
||||
|
||||
test_cd_input(CD_WP_TEST_GPIO, &config);
|
||||
@ -646,6 +653,7 @@ TEST_CASE("WP input works in SD mode", "[sd][test_env=UT_T1_SDMODE]")
|
||||
sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
|
||||
slot_config.gpio_wp = CD_WP_TEST_GPIO;
|
||||
TEST_ESP_OK(sdmmc_host_init());
|
||||
usleep(10000);
|
||||
TEST_ESP_OK(sdmmc_host_init_slot(SDMMC_HOST_SLOT_1, &slot_config));
|
||||
|
||||
test_wp_input(CD_WP_TEST_GPIO, &config);
|
||||
|
Loading…
x
Reference in New Issue
Block a user