guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: tests: Add a debug output to "fold-available-packages with/withou


From: guix-commits
Subject: 02/02: tests: Add a debug output to "fold-available-packages with/without cache".
Date: Mon, 24 Aug 2020 05:59:19 -0400 (EDT)

mothacehe pushed a commit to branch master
in repository guix.

commit afc3cd84d18c8e1dfd68eaf14bb744cb7c33b886
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Mon Aug 24 11:51:26 2020 +0200

    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.
---
 tests/packages.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/packages.scm b/tests/packages.scm
index 596a2d1..cbd0503 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))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]