diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-08-04 13:41:27 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-08-04 13:41:27 +0200 |
commit | f35d3132654bd1be5c7453f9eb43eb6e9de85a15 (patch) | |
tree | f62c3a069153d1612a5c270e991eebe43c4f5cae /tests/gexp.scm | |
parent | 1dff73acf908125b292de2ab2fc5b25155ad77d8 (diff) | |
parent | e920037793faeebf8fb2a918b50a1751b125a0af (diff) | |
download | guix-f35d3132654bd1be5c7453f9eb43eb6e9de85a15.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'tests/gexp.scm')
-rw-r--r-- | tests/gexp.scm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm index 460afe7f59..5c013d838d 100644 --- a/tests/gexp.scm +++ b/tests/gexp.scm @@ -1104,6 +1104,25 @@ (return (and (zero? (close-pipe pipe)) (= 42 (string->number str))))))))) +(test-assertm "program-file #:system" + (let* ((exp (with-imported-modules '((guix build utils)) + (gexp (begin + (use-modules (guix build utils)) + (display "hi!"))))) + (system (if (string=? (%current-system) "x86_64-linux") + "armhf-linux" + "x86_64-linux")) + (file (program-file "program" exp))) + (mlet %store-monad ((drv (lower-object file system))) + (return (and (string=? (derivation-system drv) system) + (find (lambda (input) + (let ((drv (pk (derivation-input-derivation input)))) + (and (string=? (derivation-name drv) + "module-import-compiled") + (string=? (derivation-system drv) + system)))) + (derivation-inputs drv))))))) + (test-assertm "scheme-file" (let* ((text (plain-file "foo" "Hello, world!")) (scheme (scheme-file "bar" #~(list "foo" #$text)))) |