Commit | Line | Data |
---|---|---|
8992c8a2 DH |
1 | #! /bin/sh |
2 | # Usage: check-guile [-i GUILE-INTERPRETER] [GUILE-TEST-ARGS] | |
0b6d8fdc | 3 | # If `-i GUILE-INTERPRETER' is omitted, use ${top_builddir}/meta/guile. |
931022f8 | 4 | # See ${top_srcdir}/test-suite/guile-test for documentation on GUILE-TEST-ARGS. |
8992c8a2 DH |
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 | |
8992c8a2 | 11 | |
ba833f4a TTN |
12 | set -e |
13 | ||
22087438 | 14 | top_builddir=@top_builddir_absolute@ |
829fdfbc | 15 | top_srcdir=@top_srcdir_absolute@ |
ba833f4a | 16 | |
ae84ee62 | 17 | TEST_SUITE_DIR=${top_srcdir}/test-suite |
8992c8a2 DH |
18 | |
19 | if [ x"$1" = x-i ] ; then | |
20 | guile=$2 | |
21 | shift | |
22 | shift | |
23 | else | |
0b6d8fdc | 24 | guile=${top_builddir}/meta/guile |
8992c8a2 | 25 | fi |
ae84ee62 TTN |
26 | |
27 | GUILE_LOAD_PATH=$TEST_SUITE_DIR | |
66301f9a | 28 | export GUILE_LOAD_PATH |
8992c8a2 DH |
29 | |
30 | if [ -f "$guile" -a -x "$guile" ] ; then | |
31 | echo Testing $guile ... "$@" | |
66301f9a | 32 | echo with GUILE_LOAD_PATH=$GUILE_LOAD_PATH |
8992c8a2 DH |
33 | else |
34 | echo ERROR: Cannot execute $guile | |
35 | exit 1 | |
36 | fi | |
37 | ||
66301f9a | 38 | # documentation searching ignores GUILE_LOAD_PATH. |
c52b4823 | 39 | if [ ! -f guile-procedures.txt ] ; then |
fb39eb49 | 40 | @LN_S@ libguile/guile-procedures.txt . |
66301f9a GH |
41 | fi |
42 | ||
22087438 | 43 | exec $guile \ |
ba833f4a TTN |
44 | -e main -s "$TEST_SUITE_DIR/guile-test" \ |
45 | --test-suite "$TEST_SUITE_DIR/tests" \ | |
46 | --log-file check-guile.log "$@" | |
8992c8a2 DH |
47 | |
48 | # check-guile ends here |