1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00
guile/check-guile.in
Gary Houston 66301f9ab8 * check-guile.in: 16 documentation tests were failing if "make
check" was run before Guile had been installed with the current
	--prefix.  made various changes to the script so that it runs
	without a cd to the test-suite directory.  For the -i option,
	don't point GUILE_LOAD_PATH to the current directory, but let it
	use it's own scheme library.

	* tests/r4rs.test: use test-file-name to locate r4rs.test,
	not data-file-name.

	* guile-test: define tmp-dir, the location where r4rs.test will
	create it's temporary files.
	(data-file-name): use tmp-dir.  this must be under build-dir,
	not src-dir.
2001-03-19 22:46:21 +00:00

42 lines
1.1 KiB
Bash

#! /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
# this script runs in the top-level build-dir.
srcdir=@srcdir@
TEST_SUITE_DIR=$srcdir/test-suite
if [ x"$1" = x-i ] ; then
guile=$2
shift
shift
GUILE_LOAD_PATH=$TEST_SUITE_DIR
else
guile=libguile/guile
GUILE_LOAD_PATH=$srcdir:$TEST_SUITE_DIR
fi
export GUILE_LOAD_PATH
if [ -f "$guile" -a -x "$guile" ] ; then
echo Testing $guile ... "$@"
echo with GUILE_LOAD_PATH=$GUILE_LOAD_PATH
else
echo ERROR: Cannot execute $guile
exit 1
fi
# documentation searching ignores GUILE_LOAD_PATH.
if [ ! -e guile-procedures.txt ]; then
ln -s libguile/guile-procedures.txt .
fi
exec "$guile" -e main -s "$TEST_SUITE_DIR/guile-test" --test-suite "$TEST_SUITE_DIR/tests" --log-file check-guile.log "$@"
# check-guile ends here