guix-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Ludovic Courtès
Date: Thu, 24 Aug 2023 04:56:13 -0400 (EDT)

branch: master
commit 65535e3df093fbaa5bee32252343484aea21a1f9
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Aug 24 10:19:50 2023 +0200

    tests: Relax 'db-get-build-percentages' test.
    
    This goes back to how the test was expressed before commit
    c445d2d642765f9589313e9ccdd826ef9bf71432.  This is necessary because we
    don't always get 60.
    
    * tests/database.scm ("db-get-build-percentages"): Expect more than 50%
    rather than exactly 60%.
---
 tests/database.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/database.scm b/tests/database.scm
index 0e3bb98..e87d864 100644
--- a/tests/database.scm
+++ b/tests/database.scm
@@ -642,7 +642,7 @@ timestamp, checkouttime, evaltime) VALUES ('guix', 0, 0, 0, 
0);")
       (sort (db-get-pending-derivations) string<?)))
 
   (test-equal "db-get-build-percentages"
-    '("/cur.drv" 60)
+    '("/cur.drv" #t)
     (with-fibers
       (let* ((ts (time-second (current-time time-utc)))
              (old (build (derivation "/last.drv")
@@ -678,7 +678,8 @@ timestamp, checkouttime, evaltime) VALUES ('guix', 0, 0, 0, 
0);")
         (match (db-get-build-percentages
                 (list (db-get-build (build-derivation new))))
           (((b . percentage))
-           (list (build-derivation b) percentage))))))
+           (list (build-derivation b)
+                 (>= percentage 50)))))))
 
   (test-equal "db-update-build-status!"
     (list #f 1)



reply via email to

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