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 |
6069e973 | 18 | export TEST_SUITE_DIR |
8992c8a2 DH |
19 | |
20 | if [ x"$1" = x-i ] ; then | |
21 | guile=$2 | |
22 | shift | |
23 | shift | |
24 | else | |
0b6d8fdc | 25 | guile=${top_builddir}/meta/guile |
8992c8a2 | 26 | fi |
ae84ee62 TTN |
27 | |
28 | GUILE_LOAD_PATH=$TEST_SUITE_DIR | |
66301f9a | 29 | export GUILE_LOAD_PATH |
8992c8a2 DH |
30 | |
31 | if [ -f "$guile" -a -x "$guile" ] ; then | |
32 | echo Testing $guile ... "$@" | |
66301f9a | 33 | echo with GUILE_LOAD_PATH=$GUILE_LOAD_PATH |
8992c8a2 DH |
34 | else |
35 | echo ERROR: Cannot execute $guile | |
36 | exit 1 | |
37 | fi | |
38 | ||
66301f9a | 39 | # documentation searching ignores GUILE_LOAD_PATH. |
c52b4823 | 40 | if [ ! -f guile-procedures.txt ] ; then |
fb39eb49 | 41 | @LN_S@ libguile/guile-procedures.txt . |
66301f9a GH |
42 | fi |
43 | ||
22087438 | 44 | exec $guile \ |
33002867 | 45 | --debug \ |
d10f7b57 | 46 | -L "$TEST_SUITE_DIR" \ |
6f06e8d3 | 47 | --no-auto-compile -e main -s "$TEST_SUITE_DIR/guile-test" \ |
ba833f4a TTN |
48 | --test-suite "$TEST_SUITE_DIR/tests" \ |
49 | --log-file check-guile.log "$@" | |
8992c8a2 DH |
50 | |
51 | # check-guile ends here |