From a8afb9aed320d3d3ce026936cd5fc2bdd65b331b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 7 Jul 2015 22:57:54 +0200 Subject: 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. --- tests/gexp.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/gexp.scm') 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 "^#$" -- cgit v1.2.3