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.
This commit is contained in:
Ludovic Courtès 2018-09-05 13:58:07 +02:00
parent 185948b8a8
commit 3d43017026
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 6 additions and 2 deletions

View File

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