modify example tests. delete unused arguments

This commit is contained in:
Fu Hanxi 2020-07-21 17:00:04 +08:00
parent 0478edc6ba
commit 19ad15a1b4
4 changed files with 8 additions and 12 deletions

View File

@ -6,7 +6,6 @@ import ttfw_idf
@ttfw_idf.idf_example_test(env_tag="test_jtag_arm")
def test_examples_app_trace_to_host(env, extra_data):
rel_project_path = os.path.join('examples', 'system', 'app_trace_to_host')
dut = env.get_dut('app_trace_to_host', rel_project_path)
idf_path = dut.app.get_sdk_path()
@ -28,8 +27,7 @@ def test_examples_app_trace_to_host(env, extra_data):
with ttfw_idf.CustomProcess(' '.join([os.path.join(idf_path, 'tools/esp_app_trace/logtrace_proc.py'),
'adc.log',
os.path.join(dut.app.get_binary_path(rel_project_path),
'app_trace_to_host.elf')]),
os.path.join(dut.app.binary_path, 'app_trace_to_host.elf')]),
logfile='logtrace_proc.log') as logtrace:
logtrace.pexpect_proc.expect_exact('Parse trace file')
logtrace.pexpect_proc.expect_exact('Parsing completed.')

View File

@ -13,9 +13,8 @@ def test_examples_sysview_tracing(env, extra_data):
rel_project_path = os.path.join('examples', 'system', 'sysview_tracing')
dut = env.get_dut('sysview_tracing', rel_project_path)
idf_path = dut.app.get_sdk_path()
proj_path = os.path.join(idf_path, rel_project_path)
elf_path = os.path.join(dut.app.get_binary_path(rel_project_path), 'sysview_tracing.elf')
proj_path = os.path.join(dut.app.idf_path, rel_project_path)
elf_path = os.path.join(dut.app.binary_path, 'sysview_tracing.elf')
def get_temp_file():
with tempfile.NamedTemporaryFile(delete=False) as f:

View File

@ -12,9 +12,8 @@ def test_examples_sysview_tracing_heap_log(env, extra_data):
rel_project_path = os.path.join('examples', 'system', 'sysview_tracing_heap_log')
dut = env.get_dut('sysview_tracing_heap_log', rel_project_path)
idf_path = dut.app.get_sdk_path()
proj_path = os.path.join(idf_path, rel_project_path)
elf_path = os.path.join(dut.app.get_binary_path(rel_project_path), 'sysview_tracing_heap_log.elf')
proj_path = os.path.join(dut.app.idf_path, rel_project_path)
elf_path = os.path.join(dut.app.binary_path, 'sysview_tracing_heap_log.elf')
def get_temp_file():
with tempfile.NamedTemporaryFile(delete=False) as f:
@ -45,7 +44,7 @@ def test_examples_sysview_tracing_heap_log(env, extra_data):
# dut has been restarted by gdb since the last dut.expect()
dut.expect('esp_apptrace: Initialized TRAX on CPU0')
with ttfw_idf.CustomProcess(' '.join([os.path.join(idf_path, 'tools/esp_app_trace/sysviewtrace_proc.py'),
with ttfw_idf.CustomProcess(' '.join([os.path.join(dut.app.idf_path, 'tools/esp_app_trace/sysviewtrace_proc.py'),
'-p',
'-b', elf_path,
tempfiles[1]]),

View File

@ -65,8 +65,8 @@ def test_monitor_ide_integration(env, extra_data):
for name in config_names:
Utility.console_log('Checking config "{}"... '.format(name), 'green', end='')
dut = env.get_dut('panic', rel_proj_path, app_config_name=name)
monitor_path = os.path.join(dut.app.get_sdk_path(), 'tools/idf_monitor.py')
elf_path = os.path.join(dut.app.get_binary_path(rel_proj_path), 'panic.elf')
monitor_path = os.path.join(dut.app.idf_path, 'tools/idf_monitor.py')
elf_path = os.path.join(dut.app.binary_path, 'panic.elf')
dut.start_app()
# Closing the DUT because we will reconnect with IDF Monitor
env.close_dut(dut.name)