test_apps: Fix unicore_bootloader test

This commit is contained in:
KonstantinKondrashov 2023-05-01 23:54:17 +08:00 committed by BOT
parent 037b70c253
commit 8c11859a2f

View File

@ -8,15 +8,14 @@ import ttfw_idf
@ttfw_idf.idf_custom_test(env_tag='Example_GENERIC', group='test-apps', target=['esp32', 'esp32s3'])
def test_multicore_app_and_unicore_bootloader(env, _): # type: (Any, Any) -> None
dut = env.get_dut('unicore_bootloader', 'tools/test_apps/system/unicore_bootloader', app_config_name='multicore_cfg')
print('Using binary path: {}'.format(dut.app.binary_path))
dut.start_app()
dut.expect('Multicore bootloader')
dut.expect('Multicore app')
dut.expect('App is running')
env.close_dut(dut.name)
another_build_path = dut.app.binary_path.replace('multicore_cfg', 'unicore_cfg')
print('Using binary from another_build_path: {}'.format(another_build_path))
dut.bootloader_flash(another_build_path)
dut = env.get_dut('unicore_bootloader', 'tools/test_apps/system/unicore_bootloader', app_config_name='unicore_cfg')
dut.bootloader_flash()
dut.expect('Unicore bootloader')
dut.expect('Multicore app')
dut.expect('App is running')
@ -25,14 +24,14 @@ def test_multicore_app_and_unicore_bootloader(env, _): # type: (Any, Any) -> No
@ttfw_idf.idf_custom_test(env_tag='Example_GENERIC', group='test-apps', target=['esp32', 'esp32s3'])
def test_unicore_app_and_multicore_bootloader(env, _): # type: (Any, Any) -> None
dut = env.get_dut('unicore_bootloader', 'tools/test_apps/system/unicore_bootloader', app_config_name='unicore_cfg')
print('Using binary path: {}'.format(dut.app.binary_path))
dut.start_app()
dut.expect('Unicore bootloader')
dut.expect('Unicore app')
dut.expect('App is running')
env.close_dut(dut.name)
another_build_path = dut.app.binary_path.replace('unicore_cfg', 'multicore_cfg')
print('Using binary from another_build_path: {}'.format(another_build_path))
dut.bootloader_flash(another_build_path)
dut = env.get_dut('unicore_bootloader', 'tools/test_apps/system/unicore_bootloader', app_config_name='multicore_cfg')
dut.bootloader_flash()
dut.expect('Multicore bootloader')
dut.expect('Unicore app')
dut.expect('App is running')