aboutsummaryrefslogtreecommitdiff
path: root/tests/store.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-03-07 00:18:28 +0100
committerLudovic Courtès <ludo@gnu.org>2014-03-07 00:19:03 +0100
commitcafb92d853c66b677111594727c586b87bbdd58f (patch)
tree277d0b271f5fee9faa572527f0729f15cb13df6c /tests/store.scm
parent4d01bd3c1ce8a986ebcf50c65a73cc87657f2360 (diff)
downloadpatches-cafb92d853c66b677111594727c586b87bbdd58f.tar
patches-cafb92d853c66b677111594727c586b87bbdd58f.tar.gz
store: 'export-paths' doesn't export references of the given files.
This fixes a regression introduced in 99fbddf9a623757e39d88bfb431f8f7d6f24b75b ("store: Change 'export-paths' to always export in topological order.") * guix/store.scm (export-paths): Define 'ordered' variable. Iterate over it. * tests/store.scm ("export/import paths, ensure topological order"): Add 'file0'. Adjust accordingly.
Diffstat (limited to 'tests/store.scm')
-rw-r--r--tests/store.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/store.scm b/tests/store.scm
index 7b0f3249d2..cc76ea5500 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -399,7 +399,9 @@ Deriver: ~a~%"
files)))))))
(test-assert "export/import paths, ensure topological order"
- (let* ((file1 (add-text-to-store %store "foo" (random-text)))
+ (let* ((file0 (add-text-to-store %store "baz" (random-text)))
+ (file1 (add-text-to-store %store "foo" (random-text)
+ (list file0)))
(file2 (add-text-to-store %store "bar" (random-text)
(list file1)))
(files (list file1 file2))
@@ -412,9 +414,10 @@ Deriver: ~a~%"
(bytevector=? dump1 dump2)
(let* ((source (open-bytevector-input-port dump1))
(imported (import-paths %store source)))
+ ;; DUMP1 should contain exactly FILE1 and FILE2, not FILE0.
(and (equal? imported (list file1 file2))
(every file-exists? files)
- (null? (references %store file1))
+ (equal? (list file0) (references %store file1))
(equal? (list file1) (references %store file2)))))))
(test-assert "import corrupt path"