We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79bacb6 commit a734c7fCopy full SHA for a734c7f
tools/perf/tests/shell/list.sh
@@ -3,17 +3,32 @@
3
# SPDX-License-Identifier: GPL-2.0
4
5
set -e
6
-err=0
7
8
shelldir=$(dirname "$0")
9
# shellcheck source=lib/setup_python.sh
10
. "${shelldir}"/lib/setup_python.sh
11
+list_output=$(mktemp /tmp/__perf_test.list_output.json.XXXXX)
12
+
13
+cleanup() {
14
+ rm -f "${list_output}"
15
16
+ trap - EXIT TERM INT
17
+}
18
19
+trap_cleanup() {
20
+ cleanup
21
+ exit 1
22
23
+trap trap_cleanup EXIT TERM INT
24
25
test_list_json() {
26
echo "Json output test"
- perf list -j | $PYTHON -m json.tool
27
+ perf list -j -o "${list_output}"
28
+ $PYTHON -m json.tool "${list_output}"
29
echo "Json output test [Success]"
30
}
31
32
test_list_json
-exit $err
33
+cleanup
34
+exit 0
0 commit comments