1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-02 07:40:30 +02:00

make guile-test work without configuration

* test-suite/guile-test: Use "../meta/guile" as the interpreter instead
  of "../libguile/guile".
  (default-test-suite): New function, replacing the variable of the same
  name. Look for tests in the same directory as the guile-test script.
  Throw an error if not invoked as `guile-test'.
  (test-suite): The old default value of `default-test-suite' could now
  throw an error, and this already gets initialized in `main', so don't
  provide an initial value.
This commit is contained in:
Brian Templeton 2010-07-13 20:55:45 -04:00
parent 3cb34c5c04
commit 5dc746b79e

View file

@ -1,4 +1,4 @@
#!../libguile/guile \
#!../meta/guile \
-e main -s
!#
@ -92,12 +92,15 @@
;;; User configurable settings:
(define default-test-suite
(string-append (getenv "HOME") "/bogus-path/test-suite"))
(define (default-test-suite)
(let ((argv0 (car (program-arguments))))
(if (string=? (basename argv0) "guile-test")
(dirname argv0)
(error "Cannot find default test suite."))))
;;; Variables that will receive their actual values later.
(define test-suite default-test-suite)
(define test-suite)
(define tmp-dir #f)
@ -192,7 +195,7 @@
(set! test-suite
(or (opt 'test-suite #f)
(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,