[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
11/21: gnu: icedtea-7: Run tests conditionally.
From: |
guix-commits |
Subject: |
11/21: gnu: icedtea-7: Run tests conditionally. |
Date: |
Sat, 18 Dec 2021 05:15:46 -0500 (EST) |
rekado pushed a commit to branch wip-java-bootstrap-simplify
in repository guix.
commit 5dfce206a69215f744f688b1cfa020f55c7eb8a7
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Thu Dec 16 09:15:25 2021 +0100
gnu: icedtea-7: Run tests conditionally.
* gnu/packages/java.scm (icedtea-7)[arguments]: Respect TESTS? in 'check
phase.
---
gnu/packages/java.scm | 37 ++++++++++++++++++-------------------
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 4db917d..14a84d6 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1618,30 +1618,29 @@ bootstrapping purposes.")
(("/bin/sh") (which "sh"))))
#t))
(replace 'check
- (lambda _
+ (lambda* (#:key tests? #:allow-other-keys)
;; The "make check-*" targets always return zero, so we need to
;; check for errors in the associated log files to determine
;; whether any tests have failed.
- (use-modules (ice-9 rdelim))
- (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
- (checker (lambda (port)
- (let loop ()
- (let ((line (read-line port)))
- (cond
- ((eof-object? line) #t)
- ((regexp-exec error-pattern line)
- (error "test failed"))
- (else (loop)))))))
- (run-test (lambda (test)
- (invoke "make" test)
- (call-with-input-file
- (string-append "test/" test ".log")
- checker))))
- (when #f ; skip tests
+ (when tests?
+ (use-modules (ice-9 rdelim))
+ (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
+ (checker (lambda (port)
+ (let loop ()
+ (let ((line (read-line port)))
+ (cond
+ ((eof-object? line) #t)
+ ((regexp-exec error-pattern line)
+ (error "test failed"))
+ (else (loop)))))))
+ (run-test (lambda (test)
+ (invoke "make" test)
+ (call-with-input-file
+ (string-append "test/" test ".log")
+ checker))))
(run-test "check-hotspot")
(run-test "check-langtools")
- (run-test "check-jdk"))
- #t)))
+ (run-test "check-jdk")))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((doc (string-append (assoc-ref outputs "doc")
- 19/21: gnu: icedtea-8: Remove trailing #T from build phases., (continued)
- 19/21: gnu: icedtea-8: Remove trailing #T from build phases., guix-commits, 2021/12/18
- 21/21: gnu: icedtea-8: Update to 3.19.0., guix-commits, 2021/12/18
- 10/21: gnu: Add jamvm-with-ecj4., guix-commits, 2021/12/18
- 17/21: gnu: icedtea-8: Remove commented configure flag., guix-commits, 2021/12/18
- 13/21: gnu: icedtea-7: Bind INPUTS in 'patch-paths build phase., guix-commits, 2021/12/18
- 15/21: gnu: icedtea-7: Import missing module for read-line., guix-commits, 2021/12/18
- 16/21: gnu: icedtea-7: Build with ECJ 4, Jamvm, and GNU Classpath., guix-commits, 2021/12/18
- 18/21: gnu: Remove icedtea-6., guix-commits, 2021/12/18
- 20/21: gnu: icedtea-8: Simplify source snippet., guix-commits, 2021/12/18
- 12/21: gnu: icedtea-7: Remove trailing #T., guix-commits, 2021/12/18
- 11/21: gnu: icedtea-7: Run tests conditionally.,
guix-commits <=