guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: guix-commits
Subject: 05/05: build: test-driver.scm: Allow running as a standalone script.
Date: Sun, 31 Jan 2021 22:44:11 -0500 (EST)

apteryx pushed a commit to branch master
in repository guix.

commit 26a66d0feaab7626c4053071d5557394931fe14b
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Jan 16 22:30:33 2021 -0500

    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.
---
 build-aux/test-driver.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/build-aux/test-driver.scm b/build-aux/test-driver.scm
old mode 100644
new mode 100755
index 763ba45..ac21783
--- 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")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]