1#!/usr/bin/env bash
2
3{ coverage debug sys \
4    && coverage erase &> output \
5    && coverage run -a $IDF_PATH/tools/esp_app_trace/sysviewtrace_proc.py -d -p -b test.elf cpu0.svdat cpu1.svdat &>> output \
6    && diff output expected_output \
7    && coverage report \
8; } || { echo 'The test for sysviewtrace_proc has failed. Please examine the artifacts.' ; exit 1; }
9
10{ coverage debug sys \
11    && coverage erase &> output.json \
12    && coverage run -a $IDF_PATH/tools/esp_app_trace/sysviewtrace_proc.py -j -b test.elf cpu0.svdat cpu1.svdat &>> output.json \
13    && diff output.json expected_output.json \
14    && coverage report \
15; } || { echo 'The test for sysviewtrace_proc JSON functionality has failed. Please examine the artifacts.' ; exit 1; }
16
17{ coverage debug sys \
18    && coverage erase &> output \
19    && coverage run -a $IDF_PATH/tools/esp_app_trace/sysviewtrace_proc.py -d -p -b sysview_tracing_heap_log.elf heap_log_mcore.svdat &>> output \
20    && diff output expected_output_mcore \
21    && coverage report \
22; } || { echo 'The test for mcore sysviewtrace_proc functionality has failed. Please examine the artifacts.' ; exit 1; }
23
24{ coverage debug sys \
25    && coverage erase &> output.json \
26    && coverage run -a $IDF_PATH/tools/esp_app_trace/sysviewtrace_proc.py -j -b sysview_tracing_heap_log.elf heap_log_mcore.svdat &>> output.json \
27    && diff output.json expected_output_mcore.json \
28    && coverage report \
29; } || { echo 'The test for mcore sysviewtrace_proc JSON functionality has failed. Please examine the artifacts.' ; exit 1; }
30