Skip to content

Commit

Permalink
always clean perfetto tmp files (#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjodinchr authored Jan 21, 2024
1 parent 8880305 commit f1e9776
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/perfetto/check-perfetto-trace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ EXPECTATION_SORTED="${EXPECTATION_FILE}.sorted"
# Either it is in your path, or you need to define the environment variable
TRACE_PROCESSOR_SHELL=${TRACE_PROCESSOR_SHELL:-"trace_processor_shell"}

function clean() {
rm -f "${OUTPUT_FILE}" "${EXPECTATION_SORTED}"
}
trap clean EXIT

echo "SELECT name FROM slice WHERE slice.category='clvk'" \
| "${TRACE_PROCESSOR_SHELL}" -q /dev/stdin "${TRACE_FILE}" \
| sort \
Expand All @@ -24,4 +29,3 @@ echo "SELECT name FROM slice WHERE slice.category='clvk'" \
sort "${EXPECTATION_FILE}" > "${EXPECTATION_SORTED}"

diff "${OUTPUT_FILE}" "${EXPECTATION_SORTED}"
rm "${OUTPUT_FILE}" "${EXPECTATION_SORTED}"

0 comments on commit f1e9776

Please sign in to comment.