1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

build-aux: Streamline test-driver.scm a bit.

Guile 3.0.11 ships with a new SRFI 64.

* build-aux/test-driver.scm (%test-match-all): Delete procedure.
(main): Replace %test-match-all with test-match-all.

Change-Id: Ibcd7d98194694c1de679491be4f5a603a79f6e29
This commit is contained in:
Maxim Cournoyer
2026-03-19 22:17:16 +09:00
parent 82f84f5e7f
commit c274b5c2b2

View File

@@ -213,20 +213,6 @@ cases based on their names."
(lambda (runner)
(not (string-match regexp (test-runner-test-name runner)))))
;;; XXX: test-match-all is a syntax, which isn't convenient to use with a list
;;; of test specifiers computed at run time. Copy this SRFI 64 internal
;;; definition here, which is the procedural equivalent of 'test-match-all'.
(define (%test-match-all . pred-list)
(lambda (runner)
(let ((result #t))
(let loop ((l pred-list))
(if (null? l)
result
(begin
(if (not ((car l) runner))
(set! result #f))
(loop (cdr l))))))))
;;;
;;; Entry point.
@@ -249,7 +235,7 @@ cases based on their names."
identity
(list (and=> select test-match-name*)
(and=> exclude test-match-name*/negated))))
(test-specifier (apply %test-match-all test-specifiers))
(test-specifier (apply test-match-all test-specifiers))
(color-tests (if (assoc 'color-tests opts)
(option->boolean opts 'color-tests)
#t)))