summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2020-08-24 11:51:26 +0200
committerMathieu Othacehe <othacehe@gnu.org>2020-08-24 11:54:30 +0200
commitafc3cd84d18c8e1dfd68eaf14bb744cb7c33b886 (patch)
tree835123f170428f04d363cf56f4f754289cf581a7 /tests
parent2f2dbde921e75dfb04ddcc183ca068ba05dc3d91 (diff)
downloadguix-afc3cd84d18c8e1dfd68eaf14bb744cb7c33b886.tar.gz
tests: Add a debug output to "fold-available-packages with/without cache".
This should help to debug test failures due to duplicated packages.

* tests/packages ("fold-available-packages with/without cache"): Print
duplicated packages.
Diffstat (limited to 'tests')
-rw-r--r--tests/packages.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm
index 596a2d1f83..cbd0503733 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -1326,6 +1326,15 @@
                                                       result))
                                               '()))))))
 
+    (define (find-duplicates l)
+      (match l
+        (() '())
+        ((head . tail)
+         (if (member head tail)
+             (cons head (find-duplicates tail))
+             (find-duplicates tail)))))
+
+    (pk (find-duplicates from-cache))
     (and (equal? (delete-duplicates from-cache) from-cache)
          (lset= equal? no-cache from-cache))))