linux-yocto/tools/perf/tests/shell/perftool-testsuite_report.sh
Veronika Molnarova e37cb2a6be perf testsuite report: Add test case for perf report
Add a new 'perf report' test case that acts as an entry element in 'perf
test list'.

Runs multiple subtests from directory "base_report", which can be
expanded without further editing.

Signed-off-by: Veronika Molnarova <vmolnaro@redhat.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240702110849.31904-12-vmolnaro@redhat.com
Signed-off-by: Michael Petlan <mpetlan@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2024-08-28 18:07:21 -03:00

24 lines
566 B
Bash
Executable File

#!/bin/bash
# perftool-testsuite_report
# SPDX-License-Identifier: GPL-2.0
test -d "$(dirname "$0")/base_report" || exit 2
cd "$(dirname "$0")/base_report" || exit 2
status=0
PERFSUITE_RUN_DIR=$(mktemp -d /tmp/"$(basename "$0" .sh)".XXX)
export PERFSUITE_RUN_DIR
for testcase in setup.sh test_*; do # skip setup.sh if not present or not executable
test -x "$testcase" || continue
./"$testcase"
(( status += $? ))
done
if ! [ "$PERFTEST_KEEP_LOGS" = "y" ]; then
rm -rf "$PERFSUITE_RUN_DIR"
fi
test $status -ne 0 && exit 1
exit 0