summaryrefslogtreecommitdiff
path: root/check-guile.in
diff options
context:
space:
mode:
authorDirk Herrmann <dirk@dirk-herrmanns-seiten.de>2001-01-26 13:47:53 +0000
committerDirk Herrmann <dirk@dirk-herrmanns-seiten.de>2001-01-26 13:47:53 +0000
commit8992c8a2eff76d02794ba9350433a623b5889fdc (patch)
tree686e37f4d64089b2c5eb2915ef88045d948fc121 /check-guile.in
parent1ff7abbe3ffaeacb42166cfdff62b8037c4bc349 (diff)
downloadguile-8992c8a2eff76d02794ba9350433a623b5889fdc.tar.gz
* Forgot to add the file check-guile.in with the latest commit.
Diffstat (limited to 'check-guile.in')
-rw-r--r--check-guile.in43
1 files changed, 43 insertions, 0 deletions
diff --git a/check-guile.in b/check-guile.in
new file mode 100644
index 000000000..89410eae0
--- /dev/null
+++ b/check-guile.in
@@ -0,0 +1,43 @@
+#! /bin/sh
+# Usage: check-guile [-i GUILE-INTERPRETER] [GUILE-TEST-ARGS]
+# If `-i GUILE-INTERPRETER' is omitted, use libguile/guile.
+# See test-suite/guile-test for documentation on GUILE-TEST-ARGS.
+#
+# Example invocations:
+# ./check-guile
+# ./check-guile numbers.test
+# ./check-guile -i /usr/local/bin/guile
+# ./check-guile -i /usr/local/bin/guile numbers.test
+#
+# Dependencies: dirname sed
+
+TEST_SUITE_DIR=@test_suite_dir@
+parent=`dirname $TEST_SUITE_DIR`
+
+if [ x"$1" = x-i ] ; then
+ guile=$2
+ shift
+ shift
+else
+ guile=$parent/libguile/guile
+ glp=$parent
+fi
+
+if [ -f "$guile" -a -x "$guile" ] ; then
+ echo Testing $guile ... "$@"
+ if [ x"$glp" = x ] ; then
+ glp=`$guile -c "(for-each write-line %load-path)"`
+ glp=`echo $glp | sed 's/ /:/g'`:$parent
+ fi
+ GUILE_LOAD_PATH=$glp
+ export GUILE_LOAD_PATH
+ echo with GUILE_LOAD_PATH: $GUILE_LOAD_PATH
+else
+ echo ERROR: Cannot execute $guile
+ exit 1
+fi
+
+cd $TEST_SUITE_DIR
+exec $guile -e main -s guile-test --test-suite $TEST_SUITE_DIR/tests "$@"
+
+# check-guile ends here