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:
parent
3cb34c5c04
commit
5dc746b79e
1 changed files with 8 additions and 5 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue