From 3d43017026f9995ad128915db8ca5eafe061bf75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 5 Sep 2018 13:58:07 +0200 Subject: [PATCH] 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 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)))