me
/
guix
Archived
1
0
Fork 0

build: test-driver.scm: Allow running as a standalone script.

* build-aux/test-driver.scm: Add an exec-based shebang and set the script
executable bit.
(main): Insert a newline after the version string is printed with --version.
master
Maxim Cournoyer 2021-01-16 22:30:33 -05:00
parent 93a628c4e4
commit 26a66d0fea
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 4 additions and 1 deletions

5
build-aux/test-driver.scm 100644 → 100755
View File

@ -1,3 +1,6 @@
#!/bin/sh
exec guile --no-auto-compile -e main -s "$0" "$@"
!#
;;;; test-driver.scm - Guile test driver for Automake testsuite harness ;;;; test-driver.scm - Guile test driver for Automake testsuite harness
(define script-version "2021-01-26.20") ;UTC (define script-version "2021-01-26.20") ;UTC
@ -211,7 +214,7 @@ cases based on their names."
(option (cut option-ref opts <> <>))) (option (cut option-ref opts <> <>)))
(cond (cond
((option 'help #f) (show-help)) ((option 'help #f) (show-help))
((option 'version #f) (format #t "test-driver.scm ~A" script-version)) ((option 'version #f) (format #t "test-driver.scm ~A~%" script-version))
(else (else
(let* ((log (and=> (option 'log-file #f) (cut open-file <> "w0"))) (let* ((log (and=> (option 'log-file #f) (cut open-file <> "w0")))
(trs (and=> (option 'trs-file #f) (cut open-file <> "wl"))) (trs (and=> (option 'trs-file #f) (cut open-file <> "wl")))