aboutsummaryrefslogtreecommitdiff
path: root/tests/gexp.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gexp.scm')
-rw-r--r--tests/gexp.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm
index 60adf497ed..b0ff1019e6 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -211,6 +211,17 @@
(return (string=? (readlink (string-append out "/foo"))
guile))))
+(test-assertm "gexp->derivation, default system"
+ ;; The default system should be the one at '>>=' time, not the one at
+ ;; invocation time. See <http://bugs.gnu.org/18002>.
+ (let ((system (%current-system))
+ (mdrv (parameterize ((%current-system "foobar64-linux"))
+ (gexp->derivation "foo"
+ (gexp
+ (mkdir (ungexp output)))))))
+ (mlet %store-monad ((drv mdrv))
+ (return (string=? system (derivation-system drv))))))
+
(define shebang
(string-append (derivation->output-path guile-for-build)
"/bin/guile --no-auto-compile"))