mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
tests: Avoid unnecessary use of 'mock'.
* tests/build-utils.scm ("wrap-script, simple case"): Use the real 'which' instead of mocking it.
This commit is contained in:
parent
1d64afbdc0
commit
f5698dfb87
1 changed files with 5 additions and 6 deletions
|
@ -151,11 +151,12 @@ (define-module (test-build-utils)
|
|||
(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 @@ (define-module (test-build-utils)
|
|||
(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"))))
|
||||
"/some/other/path")))
|
||||
(let ((str (call-with-input-file script-file-name get-string-all)))
|
||||
(with-directory-excursion directory
|
||||
(delete-file "foo"))
|
||||
|
|
Loading…
Reference in a new issue