CI: Use higher-level interaction with GDB in example tests and test apps

This commit is contained in:
Roland Dobai
2020-05-19 14:27:31 +02:00
committed by bot
parent 8526cb577c
commit 493c852b73
10 changed files with 159 additions and 145 deletions

View File

@@ -24,9 +24,9 @@ def test_examples_semihost_vfs(env, extra_data):
temp_dir = tempfile.mkdtemp()
host_file_path = os.path.join(proj_path, 'data', host_file_name)
shutil.copyfile(host_file_path, os.path.join(temp_dir, host_file_name))
openocd_extra_args = '-c \'set ESP_SEMIHOST_BASEDIR {}\''.format(temp_dir)
cfg_cmds = ['set ESP_SEMIHOST_BASEDIR "{}"'.format(temp_dir)]
with ttfw_idf.OCDProcess(os.path.join(proj_path, 'openocd.log'), openocd_extra_args):
with ttfw_idf.OCDBackend(os.path.join(proj_path, 'openocd.log'), dut.app.target, cfg_cmds=cfg_cmds):
dut.start_app()
dut.expect_all('example: Switch to semihosted stdout',
'example: Switched back to UART stdout',