From afc3cd84d18c8e1dfd68eaf14bb744cb7c33b886 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 24 Aug 2020 11:51:26 +0200 Subject: 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(+) (limited to 'tests') 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 @@ (define from-cache 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)))) -- cgit v1.2.3