drop extra 2006-02-06 heading
[bpt/guile.git] / check-guile.in
1 #! /bin/sh
2 # Usage: check-guile [-i GUILE-INTERPRETER] [GUILE-TEST-ARGS]
3 # If `-i GUILE-INTERPRETER' is omitted, use ${top_builddir}/pre-inst-guile.
4 # See ${top_srcdir}/test-suite/guile-test for documentation on GUILE-TEST-ARGS.
5 #
6 # Example invocations:
7 # ./check-guile
8 # ./check-guile numbers.test
9 # ./check-guile -i /usr/local/bin/guile
10 # ./check-guile -i /usr/local/bin/guile numbers.test
11
12 set -e
13
14 top_builddir=@top_builddir_absolute@
15 top_srcdir=@top_srcdir_absolute@
16
17 TEST_SUITE_DIR=${top_srcdir}/test-suite
18
19 if [ x"$1" = x-i ] ; then
20 guile=$2
21 shift
22 shift
23 else
24 guile=${top_builddir}/pre-inst-guile
25 fi
26
27 GUILE_LOAD_PATH=$TEST_SUITE_DIR
28 export GUILE_LOAD_PATH
29
30 if [ -f "$guile" -a -x "$guile" ] ; then
31 echo Testing $guile ... "$@"
32 echo with GUILE_LOAD_PATH=$GUILE_LOAD_PATH
33 else
34 echo ERROR: Cannot execute $guile
35 exit 1
36 fi
37
38 # documentation searching ignores GUILE_LOAD_PATH.
39 if [ ! -f guile-procedures.txt ] ; then
40 @LN_S@ libguile/guile-procedures.txt .
41 fi
42
43 exec $guile \
44 -e main -s "$TEST_SUITE_DIR/guile-test" \
45 --test-suite "$TEST_SUITE_DIR/tests" \
46 --log-file check-guile.log "$@"
47
48 # check-guile ends here