aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-11-24 20:48:11 +0100
committerLudovic Courtès <ludo@gnu.org>2019-11-26 00:16:35 +0100
commitf5698dfb87df1132ca5c73a8ed7f75f63c07669f (patch)
treee9131e1399790f5ad04f5e4cd89326e5e7b34b00 /tests
parent1d64afbdc0644a2be8bd2ad157085731e212ab74 (diff)
downloadguix-f5698dfb87df1132ca5c73a8ed7f75f63c07669f.tar
guix-f5698dfb87df1132ca5c73a8ed7f75f63c07669f.tar.gz
tests: Avoid unnecessary use of 'mock'.
* tests/build-utils.scm ("wrap-script, simple case"): Use the real 'which' instead of mocking it.
Diffstat (limited to 'tests')
-rw-r--r--tests/build-utils.scm11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/build-utils.scm b/tests/build-utils.scm
index ec442c267b..47a57a984b 100644
--- a/tests/build-utils.scm
+++ b/tests/build-utils.scm
@@ -151,11 +151,12 @@ echo hello world"))
(test-equal "wrap-script, simple case"
(string-append
(format #f "\
-#!GUILE --no-auto-compile
+#!~a --no-auto-compile
#!#; Guix wrapper
#\\-~s
#\\-~s
"
+ (which "guile")
'(begin (let ((current (getenv "GUIX_FOO")))
(setenv "GUIX_FOO"
(if current
@@ -175,11 +176,9 @@ echo hello world"))
(lambda (port)
(format port script-contents)))
(chmod script-file-name #o777)
-
- (mock ((guix build utils) which (const "GUILE"))
- (wrap-script script-file-name
- `("GUIX_FOO" prefix ("/some/path"
- "/some/other/path"))))
+ (wrap-script script-file-name
+ `("GUIX_FOO" prefix ("/some/path"
+ "/some/other/path")))
(let ((str (call-with-input-file script-file-name get-string-all)))
(with-directory-excursion directory
(delete-file "foo"))