summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/store.scm4
-rw-r--r--tests/guix-pack.sh8
-rw-r--r--tests/store.scm17
3 files changed, 28 insertions, 1 deletions
diff --git a/guix/store.scm b/guix/store.scm
index 6c7c07fd2da..014d08aaecc 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -1899,7 +1899,9 @@ coalesce them into a single call."
1899 (values (map/accumulate-builds store 1899 (values (map/accumulate-builds store
1900 (lambda (obj) 1900 (lambda (obj)
1901 (run-with-store store 1901 (run-with-store store
1902 (mproc obj))) 1902 (mproc obj)
1903 #:system (%current-system)
1904 #:target (%current-target-system)))
1903 lst) 1905 lst)
1904 store))) 1906 store)))
1905 1907
diff --git a/tests/guix-pack.sh b/tests/guix-pack.sh
index 14e3cda3617..39b64791e2a 100644
--- a/tests/guix-pack.sh
+++ b/tests/guix-pack.sh
@@ -40,6 +40,14 @@ trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT
40drv="`guix pack coreutils -d --no-grafts`" 40drv="`guix pack coreutils -d --no-grafts`"
41guix gc -R "$drv" | grep "`guix build coreutils -d --no-grafts`" 41guix gc -R "$drv" | grep "`guix build coreutils -d --no-grafts`"
42 42
43# Compute the derivation of a cross-compiled pack. Make sure it refers to the
44# cross-compiled package and not to the native package.
45drv="`guix pack idutils -d --no-grafts --target=arm-linux-gnueabihf`"
46guix gc -R "$drv" | \
47 grep "`guix build idutils --target=arm-linux-gnueabihf -d --no-grafts`"
48if guix gc -R "$drv" | grep "`guix build idutils -d --no-grafts`";
49then false; else true; fi
50
43# Build a tarball with no compression. 51# Build a tarball with no compression.
44guix pack --compression=none --bootstrap guile-bootstrap 52guix pack --compression=none --bootstrap guile-bootstrap
45 53
diff --git a/tests/store.scm b/tests/store.scm
index 0e80ccc2393..0af099c1ad4 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -475,6 +475,23 @@
475 (run-with-store %store 475 (run-with-store %store
476 (mapm/accumulate-builds built-derivations `((,d1) (,d2))))))) 476 (mapm/accumulate-builds built-derivations `((,d1) (,d2)))))))
477 477
478(test-equal "mapm/accumulate-builds, %current-target-system"
479 (make-list 2 '("i586-pc-gnu" "i586-pc-gnu"))
480 ;; Both the 'mapm' and 'mapm/accumulate-builds' procedures should see the
481 ;; right #:target.
482 (run-with-store %store
483 (mlet %store-monad ((lst1 (mapm %store-monad
484 (lambda _
485 (current-target-system))
486 '(a b)))
487 (lst2 (mapm/accumulate-builds
488 (lambda _
489 (current-target-system))
490 '(a b))))
491 (return (list lst1 lst2)))
492 #:system system
493 #:target "i586-pc-gnu"))
494
478(test-assert "topologically-sorted, one item" 495(test-assert "topologically-sorted, one item"
479 (let* ((a (add-text-to-store %store "a" "a")) 496 (let* ((a (add-text-to-store %store "a" "a"))
480 (b (add-text-to-store %store "b" "b" (list a))) 497 (b (add-text-to-store %store "b" "b" (list a)))