diff options
author | Mark H Weaver <mhw@netris.org> | 2014-08-20 03:17:56 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2014-08-20 03:17:56 -0400 |
commit | 647cfda83b897d3134394a499e51048a1c123389 (patch) | |
tree | 90bd1d70eb0b9b6f1f45efe48c408ec839e86c08 /tests/monads.scm | |
parent | cba95006a6129ffe2a29ff9f4ad10549214114a0 (diff) | |
parent | 667b2508464374a01db3588504b981ec9266a2ea (diff) | |
download | patches-647cfda83b897d3134394a499e51048a1c123389.tar patches-647cfda83b897d3134394a499e51048a1c123389.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/monads.scm')
-rw-r--r-- | tests/monads.scm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/monads.scm b/tests/monads.scm index ea3e4006ab..b814b0f7c5 100644 --- a/tests/monads.scm +++ b/tests/monads.scm @@ -24,6 +24,7 @@ #:select (package-derivation %current-system)) #:use-module (gnu packages) #:use-module (gnu packages bootstrap) + #:use-module ((gnu packages base) #:select (coreutils)) #:use-module (ice-9 match) #:use-module (rnrs io ports) #:use-module (srfi srfi-1) @@ -108,6 +109,30 @@ guile))) #:guile-for-build (package-derivation %store %bootstrap-guile))) +(test-assert "package-file, default system" + ;; The default system should be the one at '>>=' time, not the one at + ;; invocation time. See <http://bugs.gnu.org/18002>. + (run-with-store %store + (mlet* %store-monad + ((system -> (%current-system)) + (file (parameterize ((%current-system "foobar64-linux")) + (package-file coreutils "bin/ls"))) + (cu (package->derivation coreutils))) + (return (string=? file + (string-append (derivation->output-path cu) + "/bin/ls")))) + #:guile-for-build (package-derivation %store %bootstrap-guile))) + +(test-assert "package-file + package->cross-derivation" + (run-with-store %store + (mlet* %store-monad ((file (package-file coreutils "bin/ls" + #:target "foo64-gnu")) + (xcu (package->cross-derivation coreutils + "foo64-gnu"))) + (let ((output (derivation->output-path xcu))) + (return (string=? file (string-append output "/bin/ls"))))) + #:guile-for-build (package-derivation %store %bootstrap-guile))) + (test-assert "interned-file" (run-with-store %store (mlet* %store-monad ((file -> (search-path %load-path "guix.scm")) |