Skip to content

Commit

Permalink
Merge branch 'ci/fix_duplicated_test_names' into 'master'
Browse files Browse the repository at this point in the history
CI: rename some tests to avoid duplicated test names

See merge request espressif/esp-idf!17463
  • Loading branch information
suda-morris committed Mar 14, 2022
2 parents aab535f + 6c56f54 commit 5963de1
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void test_app_include_rtc_temp_driver(void)
{
}

TEST_CASE("Temperature_lagecy_workflow_test", "[hw_timer]")
TEST_CASE("Temperature_legacy_workflow_test", "[hw_timer]")
{
printf("Initializing Temperature sensor\n");
float tsens_out;
Expand All @@ -36,7 +36,7 @@ TEST_CASE("Temperature_lagecy_workflow_test", "[hw_timer]")
TEST_ESP_OK(temp_sensor_stop());
}

TEST_CASE("Double start error cause test", "[temperatere_sensor]")
TEST_CASE("Temperature legacy double start error cause test", "[temperature_sensor]")
{
printf("Initializing Temperature sensor\n");
temp_sensor_config_t temp_sensor = TSENS_CONFIG_DEFAULT();
Expand All @@ -46,7 +46,7 @@ TEST_CASE("Double start error cause test", "[temperatere_sensor]")
TEST_ESP_OK(temp_sensor_stop());
}

TEST_CASE("Double Start-Stop test", "[temperature_sensor]")
TEST_CASE("Temperature legacy double Start-Stop test", "[temperature_sensor]")
{
printf("Initializing Temperature sensor\n");
float tsens_out;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ TEST_CASE("Double install error cause test", "[temperature_sensor]")
TEST_ESP_OK(temperature_sensor_uninstall(temp_handle));
}

TEST_CASE("Double start error cause test", "[temperatere_sensor]")
TEST_CASE("Double start error cause test", "[temperature_sensor]")
{
printf("Initializing Temperature sensor\n");
temperature_sensor_config_t temp_sensor = TEMPERAUTRE_SENSOR_CONFIG_DEFAULT(10, 50);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.generic
def test_gptimer_example(dut: Dut) -> None:
def test_rotary_encoder(dut: Dut) -> None:
dut.expect_exact('install pcnt unit')
dut.expect_exact('set glitch filter')
dut.expect_exact('install pcnt channels')
Expand Down
4 changes: 2 additions & 2 deletions examples/protocols/modbus/serial/example_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def test_check_mode(dut=None, mode_str=None, value=None):


@ttfw_idf.idf_example_test(env_tag='Example_T2_RS485', target=['esp32'])
def test_modbus_communication(env, comm_mode):
def test_modbus_serial_communication(env, comm_mode):
global logger

# Get device under test. "dut1 - master", "dut2 - slave" must be properly connected through RS485 interface driver
Expand Down Expand Up @@ -286,5 +286,5 @@ def test_modbus_communication(env, comm_mode):
logger.addHandler(fh)
logger.addHandler(ch)
logger.info('Start script %s.' % os.path.basename(__file__))
test_modbus_communication()
test_modbus_serial_communication()
logging.shutdown()
4 changes: 2 additions & 2 deletions examples/protocols/modbus/tcp/example_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def test_check_mode(dut=None, mode_str=None, value=None):


@ttfw_idf.idf_example_test(env_tag='Example_Modbus_TCP', target=['esp32'])
def test_modbus_communication(env, comm_mode):
def test_modbus_tcp_communication(env, comm_mode):
global logger

rel_project_path = os.path.join('examples', 'protocols', 'modbus', 'tcp')
Expand Down Expand Up @@ -305,4 +305,4 @@ def test_modbus_communication(env, comm_mode):


if __name__ == '__main__':
test_modbus_communication()
test_modbus_tcp_communication()
4 changes: 2 additions & 2 deletions examples/storage/sd_card/sdmmc/sd_card_example_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


@ttfw_idf.idf_example_test(env_tag='UT_T1_SDMODE')
def test_examples_sd_card(env, extra_data): # type: (ttfw_idf.Env.Env, None ) -> None
def test_examples_sd_card_sdmmc(env, extra_data): # type: (ttfw_idf.Env.Env, None ) -> None

dut = env.get_dut('sd_card', 'examples/storage/sd_card/sdmmc')
dut.start_app()
Expand Down Expand Up @@ -33,4 +33,4 @@ def test_examples_sd_card(env, extra_data): # type: (ttfw_idf.Env.Env, None ) -


if __name__ == '__main__':
test_examples_sd_card()
test_examples_sd_card_sdmmc()
4 changes: 2 additions & 2 deletions examples/storage/sd_card/sdspi/sd_card_example_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


@ttfw_idf.idf_example_test(env_tag='UT_T1_SPIMODE', target=['esp32', 'esp32s2', 'esp32c3'])
def test_examples_sd_card(env, extra_data): # type: (ttfw_idf.Env.Env, None ) -> None
def test_examples_sd_card_sdspi(env, extra_data): # type: (ttfw_idf.Env.Env, None ) -> None

dut = env.get_dut('sd_card', 'examples/storage/sd_card/sdspi')
dut.start_app()
Expand Down Expand Up @@ -33,4 +33,4 @@ def test_examples_sd_card(env, extra_data): # type: (ttfw_idf.Env.Env, None ) -


if __name__ == '__main__':
test_examples_sd_card()
test_examples_sd_card_sdspi()
2 changes: 1 addition & 1 deletion examples/system/console/basic/pytest_console_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'history',
'nohistory',
], indirect=True)
def test_console_advanced(config: str, dut: Dut) -> None:
def test_console_basic(config: str, dut: Dut) -> None:
if config == 'history':
dut.expect('Command history enabled')
elif config == 'nohistory':
Expand Down
2 changes: 1 addition & 1 deletion tools/test_apps/peripherals/i2c_wifi/pytest_i2c_wifi.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

@pytest.mark.supported_targets
@pytest.mark.generic
def test_startup(dut: IdfDut) -> None:
def test_i2c_wifi_startup(dut: IdfDut) -> None:
dut.expect_exact('I2C-WIFI test success')
4 changes: 2 additions & 2 deletions tools/test_apps/system/startup/app_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


@ttfw_idf.idf_custom_test(env_tag='Example_GENERIC', group='test-apps')
def test_startup(env, extra_data):
def test_sys_startup(env, extra_data):
config_files = glob.glob(os.path.join(os.path.dirname(__file__), 'sdkconfig.ci.*'))
config_names = [os.path.basename(s).replace('sdkconfig.ci.', '') for s in config_files]
for name in config_names:
Expand All @@ -30,4 +30,4 @@ def test_startup(env, extra_data):


if __name__ == '__main__':
test_startup()
test_sys_startup()

0 comments on commit 5963de1

Please sign in to comment.