perftool-testsuite_probe.sh 604 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. # perftool-testsuite_probe (exclusive)
  3. # SPDX-License-Identifier: GPL-2.0
  4. [ "$(id -u)" = 0 ] || exit 2
  5. test -d "$(dirname "$0")/base_probe" || exit 2
  6. cd "$(dirname "$0")/base_probe" || exit 2
  7. status=0
  8. PERFSUITE_RUN_DIR=$(mktemp -d /tmp/"$(basename "$0" .sh)".XXX)
  9. export PERFSUITE_RUN_DIR
  10. for testcase in setup.sh test_*; do # skip setup.sh if not present or not executable
  11. test -x "$testcase" || continue
  12. ./"$testcase"
  13. (( status += $? ))
  14. done
  15. if ! [ "$PERFTEST_KEEP_LOGS" = "y" ]; then
  16. rm -rf "$PERFSUITE_RUN_DIR"
  17. fi
  18. test $status -ne 0 && exit 1
  19. exit 0