X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/462ad9f56b9665b8d22960acee73ad91f1052c9c..3159fcf14519f02c79ad84b441985982cb1efeb9:/tests/build-utils.scm 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)