diff --git a/ChangeLog b/ChangeLog index aea24ed79..15342b76b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,13 @@ * check-guile.in: rename $parent to $srcdir. if it's equal to "." 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 * check-guile.in: use @srcdir@ instead of @test_suite_dir@. use diff --git a/check-guile.in b/check-guile.in index 137cb9c3e..645755665 100644 --- a/check-guile.in +++ b/check-guile.in @@ -8,41 +8,35 @@ # ./check-guile numbers.test # ./check-guile -i /usr/local/bin/guile # ./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@ -if [ x"$srcdir" = x. ]; then - srcdir=$build_dir -fi TEST_SUITE_DIR=$srcdir/test-suite if [ x"$1" = x-i ] ; then guile=$2 shift shift - glp= + GUILE_LOAD_PATH=$TEST_SUITE_DIR else - guile=$build_dir/libguile/guile - glp=$srcdir + 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 ... "$@" - if [ x"$glp" = x ] ; then - 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 + 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 "$@" +# 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 diff --git a/test-suite/ChangeLog b/test-suite/ChangeLog index e1b177b53..c48e67f4d 100644 --- a/test-suite/ChangeLog +++ b/test-suite/ChangeLog @@ -1,3 +1,13 @@ +2001-03-19 Gary Houston + + * 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 * guile-test: use #!/bogus-path/..., not #!/home/dirk/... in the diff --git a/test-suite/guile-test b/test-suite/guile-test index be51fdb60..fa2b714f8 100755 --- a/test-suite/guile-test +++ b/test-suite/guile-test @@ -76,7 +76,7 @@ ;;; User configurable settings: (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) @@ -87,6 +87,8 @@ ;;; Variables that will receive their actual values later. (define test-suite default-test-suite) +(define tmp-dir #f) + ;;; General utilities, that probably should be in a library somewhere. @@ -126,11 +128,10 @@ ;;; The test driver. -;;; Localizing test files and temporary data files relative to the -;;; test suite directory. +;;; Localizing test files and temporary data files. (define (data-file-name filename) - (in-vicinity test-suite filename)) + (in-vicinity tmp-dir filename)) (define (test-file-name test) (in-vicinity test-suite test)) @@ -175,6 +176,11 @@ (getenv "TEST_SUITE_DIR") 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 ((foo (opt '() '()))) (if (null? foo) diff --git a/test-suite/tests/r4rs.test b/test-suite/tests/r4rs.test index d6deef1db..f8bba3079 100644 --- a/test-suite/tests/r4rs.test +++ b/test-suite/tests/r4rs.test @@ -935,8 +935,8 @@ (SECTION 6 10 1) (test #t input-port? (current-input-port)) (test #t output-port? (current-output-port)) -(test #t call-with-input-file (data-file-name "r4rs.test") input-port?) -(define this-file (open-input-file (data-file-name "r4rs.test"))) +(test #t call-with-input-file (test-file-name "r4rs.test") input-port?) +(define this-file (open-input-file (test-file-name "r4rs.test"))) (test #t input-port? this-file) (SECTION 6 10 2) (test #\; peek-char this-file)