mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
* 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.
This commit is contained in:
parent
a492830514
commit
66301f9ab8
5 changed files with 41 additions and 24 deletions
|
@ -3,6 +3,13 @@
|
||||||
* check-guile.in: rename $parent to $srcdir. if it's equal to "."
|
* check-guile.in: rename $parent to $srcdir. if it's equal to "."
|
||||||
set it to `pwd`.
|
set it to `pwd`.
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2001-03-18 Gary Houston <ghouston@arglist.com>
|
2001-03-18 Gary Houston <ghouston@arglist.com>
|
||||||
|
|
||||||
* check-guile.in: use @srcdir@ instead of @test_suite_dir@. use
|
* check-guile.in: use @srcdir@ instead of @test_suite_dir@. use
|
||||||
|
|
|
@ -8,41 +8,35 @@
|
||||||
# ./check-guile numbers.test
|
# ./check-guile numbers.test
|
||||||
# ./check-guile -i /usr/local/bin/guile
|
# ./check-guile -i /usr/local/bin/guile
|
||||||
# ./check-guile -i /usr/local/bin/guile numbers.test
|
# ./check-guile -i /usr/local/bin/guile numbers.test
|
||||||
#
|
|
||||||
# Dependencies: dirname sed
|
|
||||||
|
|
||||||
build_dir=`pwd`
|
# this script runs in the top-level build-dir.
|
||||||
srcdir=@srcdir@
|
srcdir=@srcdir@
|
||||||
if [ x"$srcdir" = x. ]; then
|
|
||||||
srcdir=$build_dir
|
|
||||||
fi
|
|
||||||
TEST_SUITE_DIR=$srcdir/test-suite
|
TEST_SUITE_DIR=$srcdir/test-suite
|
||||||
|
|
||||||
if [ x"$1" = x-i ] ; then
|
if [ x"$1" = x-i ] ; then
|
||||||
guile=$2
|
guile=$2
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
glp=
|
GUILE_LOAD_PATH=$TEST_SUITE_DIR
|
||||||
else
|
else
|
||||||
guile=$build_dir/libguile/guile
|
guile=libguile/guile
|
||||||
glp=$srcdir
|
GUILE_LOAD_PATH=$srcdir:$TEST_SUITE_DIR
|
||||||
fi
|
fi
|
||||||
|
export GUILE_LOAD_PATH
|
||||||
|
|
||||||
if [ -f "$guile" -a -x "$guile" ] ; then
|
if [ -f "$guile" -a -x "$guile" ] ; then
|
||||||
echo Testing $guile ... "$@"
|
echo Testing $guile ... "$@"
|
||||||
if [ x"$glp" = x ] ; then
|
echo with GUILE_LOAD_PATH=$GUILE_LOAD_PATH
|
||||||
glp=`$guile -c "(for-each write-line %load-path)"`
|
|
||||||
glp=`echo $glp | sed 's/ /:/g'`:$srcdir
|
|
||||||
fi
|
|
||||||
GUILE_LOAD_PATH=$glp
|
|
||||||
export GUILE_LOAD_PATH
|
|
||||||
echo with GUILE_LOAD_PATH: $GUILE_LOAD_PATH
|
|
||||||
else
|
else
|
||||||
echo ERROR: Cannot execute $guile
|
echo ERROR: Cannot execute $guile
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $TEST_SUITE_DIR
|
# documentation searching ignores GUILE_LOAD_PATH.
|
||||||
exec $guile -e main -s guile-test --test-suite $TEST_SUITE_DIR/tests --log-file $build_dir/check-guile.log "$@"
|
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
|
# check-guile ends here
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
2001-03-19 Gary Houston <ghouston@arglist.com>
|
||||||
|
|
||||||
|
* 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-18 Gary Houston <ghouston@arglist.com>
|
2001-03-18 Gary Houston <ghouston@arglist.com>
|
||||||
|
|
||||||
* guile-test: use #!/bogus-path/..., not #!/home/dirk/... in the
|
* guile-test: use #!/bogus-path/..., not #!/home/dirk/... in the
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
|
|
||||||
;;; User configurable settings:
|
;;; User configurable settings:
|
||||||
(define default-test-suite
|
(define default-test-suite
|
||||||
(string-append (getenv "HOME") "/guile-core/test-suite"))
|
(string-append (getenv "HOME") "/bogus-path/test-suite"))
|
||||||
|
|
||||||
|
|
||||||
(use-modules (test-suite lib)
|
(use-modules (test-suite lib)
|
||||||
|
@ -87,6 +87,8 @@
|
||||||
;;; Variables that will receive their actual values later.
|
;;; Variables that will receive their actual values later.
|
||||||
(define test-suite default-test-suite)
|
(define test-suite default-test-suite)
|
||||||
|
|
||||||
|
(define tmp-dir #f)
|
||||||
|
|
||||||
|
|
||||||
;;; General utilities, that probably should be in a library somewhere.
|
;;; General utilities, that probably should be in a library somewhere.
|
||||||
|
|
||||||
|
@ -126,11 +128,10 @@
|
||||||
;;; The test driver.
|
;;; The test driver.
|
||||||
|
|
||||||
|
|
||||||
;;; Localizing test files and temporary data files relative to the
|
;;; Localizing test files and temporary data files.
|
||||||
;;; test suite directory.
|
|
||||||
|
|
||||||
(define (data-file-name filename)
|
(define (data-file-name filename)
|
||||||
(in-vicinity test-suite filename))
|
(in-vicinity tmp-dir filename))
|
||||||
|
|
||||||
(define (test-file-name test)
|
(define (test-file-name test)
|
||||||
(in-vicinity test-suite test))
|
(in-vicinity test-suite test))
|
||||||
|
@ -175,6 +176,11 @@
|
||||||
(getenv "TEST_SUITE_DIR")
|
(getenv "TEST_SUITE_DIR")
|
||||||
default-test-suite))
|
default-test-suite))
|
||||||
|
|
||||||
|
;; directory where temporary files are created.
|
||||||
|
;; when run from "make check", this must be under the build-dir,
|
||||||
|
;; not the src-dir.
|
||||||
|
(set! tmp-dir (getcwd))
|
||||||
|
|
||||||
(let* ((tests
|
(let* ((tests
|
||||||
(let ((foo (opt '() '())))
|
(let ((foo (opt '() '())))
|
||||||
(if (null? foo)
|
(if (null? foo)
|
||||||
|
|
|
@ -935,8 +935,8 @@
|
||||||
(SECTION 6 10 1)
|
(SECTION 6 10 1)
|
||||||
(test #t input-port? (current-input-port))
|
(test #t input-port? (current-input-port))
|
||||||
(test #t output-port? (current-output-port))
|
(test #t output-port? (current-output-port))
|
||||||
(test #t call-with-input-file (data-file-name "r4rs.test") input-port?)
|
(test #t call-with-input-file (test-file-name "r4rs.test") input-port?)
|
||||||
(define this-file (open-input-file (data-file-name "r4rs.test")))
|
(define this-file (open-input-file (test-file-name "r4rs.test")))
|
||||||
(test #t input-port? this-file)
|
(test #t input-port? this-file)
|
||||||
(SECTION 6 10 2)
|
(SECTION 6 10 2)
|
||||||
(test #\; peek-char this-file)
|
(test #\; peek-char this-file)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue