diff options
author | Marius Bakke <mbakke@fastmail.com> | 2020-03-09 21:45:32 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2020-03-09 21:45:32 +0100 |
commit | b3b5714fa72bf661003f27fbccba5697f5810115 (patch) | |
tree | c4eedb0b21200ba438cd1d0d67cd79e6b63926f7 /tests | |
parent | b6f946f039afad6cbc7027d52685072f7fbb8d35 (diff) | |
parent | 51f30d4fdf197b1dad5ddb1405611fbaee55d1f2 (diff) | |
download | guix-b3b5714fa72bf661003f27fbccba5697f5810115.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gexp.scm | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm index 7c8985d846..9e38816c3d 100644 --- a/tests/gexp.scm +++ b/tests/gexp.scm @@ -1331,6 +1331,56 @@ '#~(foo #$bar #$baz:out #$(chbouib 42) #$@(list x y z) #+foo #+foo:out #+(chbouib 42) #+@(list x y z))) +(test-assertm "gexp->file, cross-compilation" + (mlet* %store-monad ((target -> "aarch64-linux-gnu") + (exp -> (gexp (list (ungexp coreutils)))) + (xdrv (gexp->file "foo" exp #:target target)) + (refs (references* + (derivation-file-name xdrv))) + (xcu (package->cross-derivation coreutils + target)) + (cu (package->derivation coreutils))) + (return (and (member (derivation-file-name xcu) refs) + (not (member (derivation-file-name cu) refs)))))) + +(test-assertm "gexp->file, cross-compilation with default target" + (mlet* %store-monad ((target -> "aarch64-linux-gnu") + (_ (set-current-target target)) + (exp -> (gexp (list (ungexp coreutils)))) + (xdrv (gexp->file "foo" exp)) + (refs (references* + (derivation-file-name xdrv))) + (xcu (package->cross-derivation coreutils + target)) + (cu (package->derivation coreutils))) + (return (and (member (derivation-file-name xcu) refs) + (not (member (derivation-file-name cu) refs)))))) + +(test-assertm "gexp->script, cross-compilation" + (mlet* %store-monad ((target -> "aarch64-linux-gnu") + (exp -> (gexp (list (ungexp coreutils)))) + (xdrv (gexp->script "foo" exp #:target target)) + (refs (references* + (derivation-file-name xdrv))) + (xcu (package->cross-derivation coreutils + target)) + (cu (package->derivation coreutils))) + (return (and (member (derivation-file-name xcu) refs) + (not (member (derivation-file-name cu) refs)))))) + +(test-assertm "gexp->script, cross-compilation with default target" + (mlet* %store-monad ((target -> "aarch64-linux-gnu") + (_ (set-current-target target)) + (exp -> (gexp (list (ungexp coreutils)))) + (xdrv (gexp->script "foo" exp)) + (refs (references* + (derivation-file-name xdrv))) + (xcu (package->cross-derivation coreutils + target)) + (cu (package->derivation coreutils))) + (return (and (member (derivation-file-name xcu) refs) + (not (member (derivation-file-name cu) refs)))))) + (test-end "gexp") ;; Local Variables: |