diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-09-05 13:58:07 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-09-05 13:59:10 +0200 |
commit | 3d43017026f9995ad128915db8ca5eafe061bf75 (patch) | |
tree | 28f981b80cede838ea8c871904479b6dd611833e | |
parent | 185948b8a83f583135de050698cff983e46c8145 (diff) | |
download | guix-3d43017026f9995ad128915db8ca5eafe061bf75.tar guix-3d43017026f9995ad128915db8ca5eafe061bf75.tar.gz |
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.
-rw-r--r-- | tests/store.scm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/store.scm b/tests/store.scm index 71ac57580e..2858369706 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))) |