File size: 1,410 Bytes
3dcad1f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
#!/bin/sh
set -ue
script_home="$(cd "$(dirname "$0")" && pwd)"
usage()
{
cat <<-EOF
Usage: driver [OPTION ...] -- TEST [ARG ...]
This is a test
Options:
--log-file PATH
--trs-file PATH
--color-tests (yes|no) currently ignored
--expect-failure (yes|no) currently ignored
--enable-hard-errors (yes|no) currently ignored
--test-name NAME currently ignored
This command provides an Automake parallel test harness
compatible driver for running TEST with Guile. This is
essentially an adapter for check-guile and it currently
assumes that check-guile is in the parent directory.
EOF
}
misuse() { usage 1>&2; exit 2; }
test_name=''
log_file=''
trs_file=''
while test $# -gt 0; do
case "$1" in
--test-name) test $# -gt 1 || misuse; test_name="$2"; shift 2 ;;
--log-file) test $# -gt 1 || misuse; log_file="$2"; shift 2 ;;
--trs-file) test $# -gt 1 || misuse; trs_file="$2"; shift 2 ;;
--color-tests|--expect-failure|--enable-hard-errors) shift 2 ;;
--) shift; break ;;
*) break ;;
esac
done
test "$test_name" || misuse
test "$log_file" || misuse
test "$trs_file" || misuse
test $# -gt 0 || misuse
program="$1"
shift
cd ..
exec ./check-guile \
--log-file "test-suite/$log_file" \
--trs-file "test-suite/$trs_file" \
"$(basename "$program")"
|