xref: /linux/tools/perf/tests/shell/perftool-testsuite_report.sh (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
1*e37cb2a6SVeronika Molnarova#!/bin/bash
2*e37cb2a6SVeronika Molnarova# perftool-testsuite_report
3*e37cb2a6SVeronika Molnarova# SPDX-License-Identifier: GPL-2.0
4*e37cb2a6SVeronika Molnarova
5*e37cb2a6SVeronika Molnarovatest -d "$(dirname "$0")/base_report" || exit 2
6*e37cb2a6SVeronika Molnarovacd "$(dirname "$0")/base_report" || exit 2
7*e37cb2a6SVeronika Molnarovastatus=0
8*e37cb2a6SVeronika Molnarova
9*e37cb2a6SVeronika MolnarovaPERFSUITE_RUN_DIR=$(mktemp -d /tmp/"$(basename "$0" .sh)".XXX)
10*e37cb2a6SVeronika Molnarovaexport PERFSUITE_RUN_DIR
11*e37cb2a6SVeronika Molnarova
12*e37cb2a6SVeronika Molnarovafor testcase in setup.sh test_*; do                  # skip setup.sh if not present or not executable
13*e37cb2a6SVeronika Molnarova     test -x "$testcase" || continue
14*e37cb2a6SVeronika Molnarova     ./"$testcase"
15*e37cb2a6SVeronika Molnarova     (( status += $? ))
16*e37cb2a6SVeronika Molnarovadone
17*e37cb2a6SVeronika Molnarova
18*e37cb2a6SVeronika Molnarovaif ! [ "$PERFTEST_KEEP_LOGS" = "y" ]; then
19*e37cb2a6SVeronika Molnarova	rm -rf "$PERFSUITE_RUN_DIR"
20*e37cb2a6SVeronika Molnarovafi
21*e37cb2a6SVeronika Molnarova
22*e37cb2a6SVeronika Molnarovatest $status -ne 0 && exit 1
23*e37cb2a6SVeronika Molnarovaexit 0
24