diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2021-12-16 09:15:25 +0100 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2021-12-23 20:27:46 +0100 |
commit | 9e6baab2d8aa729b625eaa9104bfc1e71e12ccc2 (patch) | |
tree | f18f85ba642bbb0a4d91206471aec0ad9f9d06e2 /gnu/packages/java.scm | |
parent | 35bac40a670b82f9b113d34f25c63b60e22f6096 (diff) |
gnu: icedtea-7: Run tests conditionally.
* gnu/packages/java.scm (icedtea-7)[arguments]: Respect TESTS? in 'check
phase.
Diffstat (limited to 'gnu/packages/java.scm')
-rw-r--r-- | gnu/packages/java.scm | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index c1b3032029..e2a26f2a50 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") |