guix-commits
[Top][All Lists]
Advanced

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

02/02: tests: Adjust 'add-file-tree-to-store' test for lack of /bin/sh.


From: Ludovic Courtès
Subject: 02/02: tests: Adjust 'add-file-tree-to-store' test for lack of /bin/sh.
Date: Wed, 5 Sep 2018 08:09:19 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 3d43017026f9995ad128915db8ca5eafe061bf75
Author: Ludovic Courtès <address@hidden>
Date:   Wed Sep 5 13:58:07 2018 +0200

    tests: Adjust 'add-file-tree-to-store' test for lack of /bin/sh.
    
    * tests/store.scm (%shell): New variable.
    ("add-file-tree-to-store"): Use it instead of "/bin/sh".  This fixes
    builds in the chroot build environment.
---
 tests/store.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/store.scm b/tests/store.scm
index 71ac575..2858369 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -45,6 +45,9 @@
 (define %store
   (open-connection-for-tests))
 
+(define %shell
+  (or (getenv "SHELL") (getenv "CONFIG_SHELL")))
+
 
 (test-begin "store")
 
@@ -220,7 +223,8 @@
     ("./foo/c" directory #t)
     ("./foo/c/p" regular "file p")
     ("./foo/c/q" directory #t)
-    ("./foo/c/q/x" regular "#!/bin/sh\nexit 42")
+    ("./foo/c/q/x" regular
+     ,(string-append "#!" %shell "\nexit 42"))
     ("./foo/c/q/y" symlink "..")
     ("./foo/c/q/z" directory #t))
   (let* ((tree  `("file-tree" directory
@@ -231,7 +235,7 @@
                     ("p" regular (data ,(string->utf8 "file p")))
                     ("q" directory
                      ("x" executable
-                      (data "#!/bin/sh\nexit 42"))
+                      (data ,(string-append "#!" %shell "\nexit 42")))
                      ("y" symlink "..")
                      ("z" directory))))
                   ("bar" directory)))



reply via email to

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