mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
ci(esp32c61): enable multi dut runner for c61
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import pytest
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
# If `test_env` is define, should not run on generic runner
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@@ -18,7 +17,7 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
def test_master_single_dev(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if 'test_env' in case.attributes:
|
||||
continue
|
||||
continue # If `test_env` is defined, should not run on generic runner
|
||||
case_tester.run_normal_case(case=case, reset=True)
|
||||
|
||||
|
||||
@@ -39,9 +38,6 @@ def test_master_esp_flash(case_tester) -> None: # type: ignore
|
||||
case_tester.run_normal_case(case=case, reset=True)
|
||||
|
||||
|
||||
# if `test_env` not defined, will run on `generic_multi_device` by default
|
||||
# TODO: [ESP32C61] IDF-10949
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='no multi-dev runner')
|
||||
@pytest.mark.generic_multi_device
|
||||
@pytest.mark.parametrize(
|
||||
'count, config',
|
||||
@@ -54,6 +50,4 @@ def test_master_esp_flash(case_tester) -> None: # type: ignore
|
||||
)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_master_multi_dev(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device':
|
||||
case_tester.run_multi_dev_case(case=case, reset=True)
|
||||
case_tester.run_all_multi_dev_cases(reset=True)
|
||||
|
||||
@@ -1278,12 +1278,12 @@ static void test_master_fd_dma(void)
|
||||
.spics_io_num = PIN_NUM_CS,
|
||||
.queue_size = 16,
|
||||
.clock_speed_hz = s_spi_bus_freq[speed_level],
|
||||
.cs_ena_pretrans = 2,
|
||||
};
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
if (is_gpio && (s_spi_bus_freq[speed_level] >= 10 * 1000 * 1000)) {
|
||||
continue; //On esp32 with GPIO Matrix, clk freq <= 10MHz
|
||||
}
|
||||
devcfg.cs_ena_pretrans = 2;
|
||||
devcfg.input_delay_ns = 12.5 * 2;
|
||||
#endif
|
||||
TEST_ESP_OK(spi_bus_add_device(TEST_SPI_HOST, &devcfg, &dev0));
|
||||
@@ -1393,12 +1393,12 @@ static void test_master_fd_no_dma(void)
|
||||
.spics_io_num = PIN_NUM_CS,
|
||||
.queue_size = 16,
|
||||
.clock_speed_hz = s_spi_bus_freq[speed_level],
|
||||
.cs_ena_pretrans = 2,
|
||||
};
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
if (is_gpio && (s_spi_bus_freq[speed_level] >= 10 * 1000 * 1000)) {
|
||||
continue; //On esp32 with GPIO Matrix, clk freq <= 10MHz
|
||||
}
|
||||
devcfg.cs_ena_pretrans = 2,
|
||||
devcfg.input_delay_ns = 12.5 * 2,
|
||||
#endif
|
||||
TEST_ESP_OK(spi_bus_add_device(TEST_SPI_HOST, &devcfg, &dev0));
|
||||
@@ -1508,6 +1508,7 @@ static void test_master_hd_dma(void)
|
||||
spi_device_interface_config_t devcfg = {
|
||||
.spics_io_num = PIN_NUM_CS,
|
||||
.clock_speed_hz = s_spi_bus_freq[speed_level],
|
||||
.cs_ena_pretrans = 2,
|
||||
.mode = mode,
|
||||
.flags = SPI_DEVICE_HALFDUPLEX,
|
||||
.command_bits = 8,
|
||||
@@ -1616,6 +1617,7 @@ static void test_master_hd_no_dma(void)
|
||||
spi_device_interface_config_t devcfg = {
|
||||
.spics_io_num = PIN_NUM_CS,
|
||||
.clock_speed_hz = s_spi_bus_freq[speed_level],
|
||||
.cs_ena_pretrans = 2,
|
||||
.mode = mode,
|
||||
.flags = SPI_DEVICE_HALFDUPLEX,
|
||||
.command_bits = 8,
|
||||
@@ -1739,10 +1741,10 @@ static void test_master_sio_dma(void)
|
||||
.spics_io_num = PIN_NUM_CS,
|
||||
.queue_size = 16,
|
||||
.clock_speed_hz = s_spi_bus_freq[speed_level],
|
||||
.cs_ena_pretrans = 2,
|
||||
.flags = SPI_DEVICE_HALFDUPLEX | SPI_DEVICE_3WIRE,
|
||||
};
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
devcfg.cs_ena_pretrans = 2;
|
||||
devcfg.input_delay_ns = s_master_input_delay[speed_level];
|
||||
#endif
|
||||
TEST_ESP_OK(spi_bus_add_device(TEST_SPI_HOST, &devcfg, &dev0));
|
||||
@@ -1874,7 +1876,6 @@ static void test_master_sio_no_dma(void)
|
||||
.flags = SPI_DEVICE_HALFDUPLEX | SPI_DEVICE_3WIRE,
|
||||
};
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
devcfg.cs_ena_pretrans = 2;
|
||||
devcfg.input_delay_ns = s_master_input_delay[speed_level];
|
||||
#endif
|
||||
TEST_ESP_OK(spi_bus_add_device(TEST_SPI_HOST, &devcfg, &dev0));
|
||||
|
||||
@@ -2,31 +2,16 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import pytest
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
# If `test_env` is define, should not run on generic runner
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_param_single_dev(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if 'test_env' in case.attributes:
|
||||
continue
|
||||
case_tester.run_normal_case(case=case, reset=True)
|
||||
case_tester.run_all_normal_cases(reset=True)
|
||||
|
||||
|
||||
# if `test_env` not defined, will run on `generic_multi_device` by default
|
||||
# TODO: [ESP32C61] IDF-10949
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='no multi-dev runner')
|
||||
@pytest.mark.generic_multi_device
|
||||
@pytest.mark.parametrize(
|
||||
'count',
|
||||
[
|
||||
2,
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@pytest.mark.parametrize('count', [2], indirect=True)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_param_multi_dev(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device':
|
||||
case_tester.run_multi_dev_case(case=case, reset=True)
|
||||
case_tester.run_all_multi_dev_cases(reset=True)
|
||||
|
||||
@@ -2,26 +2,17 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import pytest
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
# If `test_env` is define, should not run on generic runner
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', ['release', 'iram_safe'], indirect=True)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_slave_single_dev(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if 'test_env' in case.attributes:
|
||||
continue
|
||||
case_tester.run_normal_case(case=case, reset=True)
|
||||
case_tester.run_all_normal_cases(reset=True)
|
||||
|
||||
|
||||
# if `test_env` not defined, will run on `generic_multi_device` by default
|
||||
# TODO: [ESP32C61] IDF-10949
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='no multi-dev runner')
|
||||
@pytest.mark.generic_multi_device
|
||||
@pytest.mark.parametrize('count, config', [(2, 'release'), (2, 'iram_safe')], indirect=True)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_slave_multi_dev(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device':
|
||||
case_tester.run_multi_dev_case(case=case, reset=True)
|
||||
case_tester.run_all_multi_dev_cases(reset=True)
|
||||
|
||||
@@ -14,10 +14,7 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_slave_hd_single_dev(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if 'test_env' in case.attributes:
|
||||
continue
|
||||
case_tester.run_normal_case(case=case, reset=True, timeout=180)
|
||||
case_tester.run_all_normal_cases(reset=True, timeout=180)
|
||||
|
||||
|
||||
# if `test_env` not defined, will run on `generic_multi_device` by default
|
||||
@@ -29,6 +26,4 @@ def test_slave_hd_single_dev(case_tester) -> None: # type: ignore
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_slave_hd_multi_dev(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device':
|
||||
case_tester.run_multi_dev_case(case=case, reset=True)
|
||||
case_tester.run_all_multi_dev_cases(reset=True)
|
||||
|
||||
Reference in New Issue
Block a user