mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
the current directory (build dir) not srcdir to find guile executable. otherwise "make check" doesn't work with a separate build directory. create the test log in $build_dir/check-guile.log instead of in srcdir/test-suite directory. * configure.in: don't define or substitute test_suite_dir. * guile-test: use #!/bogus-path/..., not #!/home/dirk/... in the first line.
45 lines
1.1 KiB
Bash
45 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
|
|
#
|
|
# Dependencies: dirname sed
|
|
|
|
TEST_SUITE_DIR=@srcdir@/test-suite
|
|
parent=@srcdir@
|
|
build_dir=`pwd`
|
|
|
|
if [ x"$1" = x-i ] ; then
|
|
guile=$2
|
|
shift
|
|
shift
|
|
glp=
|
|
else
|
|
guile=$build_dir/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 --log-file $build_dir/check-guile.log "$@"
|
|
|
|
# check-guile ends here
|