aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-07-07 22:57:54 +0200
committerLudovic Courtès <ludo@gnu.org>2015-07-08 00:06:45 +0200
commita8afb9aed320d3d3ce026936cd5fc2bdd65b331b (patch)
tree00b79e413e97502ab5bf471bbdba2ce17092220f /tests
parentd7facc660394ce5575b554abdb19a70f0a389082 (diff)
downloadguix-a8afb9aed320d3d3ce026936cd5fc2bdd65b331b.tar
guix-a8afb9aed320d3d3ce026936cd5fc2bdd65b331b.tar.gz
store: 'run-with-store' initializes %CURRENT-TARGET-SYSTEM to #f.
* guix/store.scm (run-with-store): Set %CURRENT-TARGET-SYSTEM to #f. * tests/gexp.scm ("gexp->derivation vs. %current-target-system"): New test.
Diffstat (limited to 'tests')
-rw-r--r--tests/gexp.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm
index 32031663f5..5c9a4fc031 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -636,6 +636,17 @@
file)))))
#:guile-for-build (package-derivation %store %bootstrap-guile))))
+(test-assert "gexp->derivation vs. %current-target-system"
+ (let ((mval (gexp->derivation "foo"
+ #~(begin
+ (mkdir #$output)
+ (foo #+gnu-make))
+ #:target #f)))
+ ;; The value of %CURRENT-TARGET-SYSTEM at bind-time should have no
+ ;; influence.
+ (parameterize ((%current-target-system "fooooo"))
+ (derivation? (run-with-store %store mval)))))
+
(test-assert "printer"
(string-match "^#<gexp \\(string-append .*#<package coreutils.*\
\"/bin/uname\"\\) [[:xdigit:]]+>$"