diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-11-28 00:38:25 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-11-28 00:38:25 +0100 |
commit | 0897ad7fac04fc9d814e83eed46e88c7bf9740bc (patch) | |
tree | 9bccfdb52de4c468778ceaabe337c0539c302a30 /tests/build-utils.scm | |
parent | 6d460e80d1b06fc094374e7ba5c2503f2a897f11 (diff) | |
parent | 9943d238e9f07dccae973b641eb7738637ce95fb (diff) | |
download | patches-0897ad7fac04fc9d814e83eed46e88c7bf9740bc.tar patches-0897ad7fac04fc9d814e83eed46e88c7bf9740bc.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'tests/build-utils.scm')
-rw-r--r-- | tests/build-utils.scm | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/tests/build-utils.scm b/tests/build-utils.scm index 61e6c44e63..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")) @@ -235,13 +234,11 @@ print('hello world')")) (lambda (port) (format port "This is not a script"))) (chmod script-file-name #o777) - (catch 'srfi-34 - (lambda () - (wrap-script script-file-name - #:guile "MYGUILE" - `("GUIX_FOO" prefix ("/some/path" - "/some/other/path")))) - (lambda (type obj) - (wrap-error? obj))))))) + (guard (c ((wrap-error? c) #t)) + (wrap-script script-file-name + #:guile "MYGUILE" + `("GUIX_FOO" prefix ("/some/path" + "/some/other/path"))) + #f))))) (test-end) |