summaryrefslogtreecommitdiff
path: root/tools/perf/tests/shell/attr.sh
blob: ca3ca4a193971ec17272b1d75d6d2085ff6f916a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# Perf attribute expectations test
# SPDX-License-Identifier: GPL-2.0

err=0

shelldir=$(dirname "$0")
# shellcheck source=lib/setup_python.sh
. "${shelldir}"/lib/setup_python.sh

cleanup() {
  trap - EXIT TERM INT
}

trap_cleanup() {
  echo "Unexpected signal in ${FUNCNAME[1]}"
  cleanup
  exit 1
}
trap trap_cleanup EXIT TERM INT

shelldir=$(dirname "$0")
perf_path=$(which perf)
$PYTHON "${shelldir}"/lib/attr.py -d "${shelldir}"/attr -v -p "$perf_path"
err=$?
cleanup
exit $err