runtests 899B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. # ffoo test framework
  3. # See LICENSE file for copyright and license details.
  4. die() {
  5. echo "$@" && exit 9
  6. }
  7. export LC_ALL=C
  8. export TF_DIR=${TF_DIR:-tfkit}
  9. export TF_SUITE="${TF_SUITE:-tests}"
  10. . $TF_DIR/include/harness.sh || die "this must be run from project root"
  11. usage() {
  12. echo "usage: $(basename $0) [-c] [-t tests_re] [-s subtest_re] [-p binpath] [-v] [-d]" >&2
  13. exit 2
  14. }
  15. while true; do case "$1" in
  16. -c|--collect) export TF_COLLECT=always; shift ;;
  17. -t|--filter-test) export TF_FILTER_TEST="$2"; shift 2 ;;
  18. -s|--filter-subtest) export TF_FILTER_SUBTEST="$2"; shift 2 ;;
  19. -p|--prefix) export PATH="$(readlink -f "$2")/bin:$PATH"; shift 2 ;;
  20. -d|--debug) export TF_DEBUG=true; shift ;;
  21. -v|--verbose) export TF_VERBOSE=true; shift ;;
  22. "") break ;;
  23. *) usage ;;
  24. esac done
  25. time tf_run_tests