diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-07-31 14:28:56 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-07-31 14:28:56 +0200 |
commit | 6a2e54236e1b2c428c8fd478ee0f3bd8130703fa (patch) | |
tree | af70155a2f474d35d90d003f8584b2d9ee0bbaa8 /tests/gexp.scm | |
parent | 2cf1e37c109c8d03fae75bc84f7012f3afa956e5 (diff) | |
parent | 3d88855dfdcc4c8ce11f494fdf9f0ac1d8eef530 (diff) | |
download | patches-6a2e54236e1b2c428c8fd478ee0f3bd8130703fa.tar patches-6a2e54236e1b2c428c8fd478ee0f3bd8130703fa.tar.gz |
Merge branch 'master' into core-updates
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)))) |