kopia lustrzana https://github.com/espressif/esp-idf
CI: Check the number of detected cores of apptrace
rodzic
fcbcdf32d8
commit
9177682a7e
|
@ -12,8 +12,9 @@ def test_examples_app_trace_to_host(env, extra_data):
|
|||
dut = env.get_dut('app_trace_to_host', rel_project_path)
|
||||
idf_path = dut.app.get_sdk_path()
|
||||
proj_path = os.path.join(idf_path, rel_project_path)
|
||||
oocd_log_path = os.path.join(proj_path, 'openocd.log')
|
||||
|
||||
with ttfw_idf.OCDBackend(os.path.join(proj_path, 'openocd.log'), dut.app.target) as ocd:
|
||||
with ttfw_idf.OCDBackend(oocd_log_path, dut.app.target) as ocd:
|
||||
dut.start_app()
|
||||
dut.expect_all('example: Enabling ADC1 on channel 6 / GPIO34.',
|
||||
'example: Enabling CW generator on DAC channel 1',
|
||||
|
@ -27,6 +28,15 @@ def test_examples_app_trace_to_host(env, extra_data):
|
|||
ocd.apptrace_start('file://adc.log 0 9000 5 0 0')
|
||||
ocd.apptrace_wait_stop(tmo=30)
|
||||
|
||||
with open(oocd_log_path) as oocd_log:
|
||||
cores = 1 if dut.app.get_sdkconfig().get('CONFIG_FREERTOS_UNICORE', '').replace('"','') == 'y' else 2
|
||||
params_str = 'App trace params: from {} cores'.format(cores)
|
||||
for line in oocd_log:
|
||||
if params_str in line:
|
||||
break
|
||||
else:
|
||||
raise RuntimeError('"{}" could not be found in {}'.format(params_str, oocd_log_path))
|
||||
|
||||
with ttfw_idf.CustomProcess(' '.join([os.path.join(idf_path, 'tools/esp_app_trace/logtrace_proc.py'),
|
||||
'adc.log',
|
||||
os.path.join(dut.app.binary_path, 'app_trace_to_host.elf')]),
|
||||
|
|
Ładowanie…
Reference in New Issue