*** empty log message ***
[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_srcdir}/pre-inst-guile.
4 # See 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 # this script runs in the top-level build-dir.
15 top_builddir=`pwd`
16 top_srcdir=@top_srcdir@
17
18 TEST_SUITE_DIR=${top_srcdir}/test-suite
19
20 if [ x"$1" = x-i ] ; then
21 guile=$2
22 guile_opts=
23 shift
24 shift
25 else
26 guile=${top_srcdir}/pre-inst-guile
27 guile_opts="${top_builddir}"
28 fi
29
30 GUILE_LOAD_PATH=$TEST_SUITE_DIR
31 export GUILE_LOAD_PATH
32
33 if [ -f "$guile" -a -x "$guile" ] ; then
34 echo Testing $guile ... "$@"
35 echo with GUILE_LOAD_PATH=$GUILE_LOAD_PATH
36 else
37 echo ERROR: Cannot execute $guile
38 exit 1
39 fi
40
41 # documentation searching ignores GUILE_LOAD_PATH.
42 if [ ! -f guile-procedures.txt ] ; then
43 @LN_S@ libguile/guile-procedures.txt .
44 fi
45
46 exec $guile $guile_opts \
47 -e main -s "$TEST_SUITE_DIR/guile-test" \
48 --test-suite "$TEST_SUITE_DIR/tests" \
49 --log-file check-guile.log "$@"
50
51 # check-guile ends here