summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-01-16 22:30:33 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-01-31 22:28:46 -0500
commit26a66d0feaab7626c4053071d5557394931fe14b (patch)
tree3e19c3ea6d9a05c7ad477e75fb31f8c8b2640c38
parent93a628c4e4f4a7f6665190f3c52a417daebaf28a (diff)
downloadguix-26a66d0feaab7626c4053071d5557394931fe14b.tar.gz
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.
-rwxr-xr-x[-rw-r--r--]build-aux/test-driver.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/build-aux/test-driver.scm b/build-aux/test-driver.scm
index 763ba457d8..ac21783d41 100644..100755
--- a/build-aux/test-driver.scm
+++ b/build-aux/test-driver.scm
@@ -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
 
 (define script-version "2021-01-26.20") ;UTC
@@ -211,7 +214,7 @@ cases based on their names."
          (option (cut option-ref opts <> <>)))
     (cond
      ((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
       (let* ((log (and=> (option 'log-file #f) (cut open-file <> "w0")))
              (trs (and=> (option 'trs-file #f) (cut open-file <> "wl")))