gnu: hypre: Honor the #:tests? flag.

* gnu/packages/maths.scm (hypre)[arguments]: Adjust 'check phase to
honor the #:tests? flag.

Change-Id: I475fabd7d9f73ed320b97a4767830d82190c2b15
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
This commit is contained in:
Lars Bilke 2024-03-08 12:08:11 +01:00 committed by Efraim Flashner
parent 6cff29fb6e
commit f7e6a84e98
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -7136,16 +7136,21 @@ (define-public hypre
(lambda _
(invoke "make" "-C" "docs")))
(replace 'check
(lambda _
(setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/hypre/lib"))
(setenv "PATH" (string-append "." ":" (getenv "PATH")))
(invoke "make" "check" "CHECKRUN=")
(for-each (lambda (filename)
(let ((size (stat:size (stat filename))))
(when (positive? size)
(error (format #f "~a size ~d; error indication~%"
filename size)))))
(find-files "test" ".*\\.err$"))))
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(setenv "LD_LIBRARY_PATH"
(string-append (getcwd) "/hypre/lib"))
(setenv "PATH"
(string-append "." ":"
(getenv "PATH")))
(invoke "make" "check" "CHECKRUN=")
(for-each (lambda (filename)
(let ((size (stat:size (stat filename))))
(when (positive? size)
(error (format #f
"~a size ~d; error indication~%"
filename size)))))
(find-files "test" ".*\\.err$")))))
(add-after 'install 'install-docs
(lambda* (#:key outputs #:allow-other-keys)
;; Custom install because docs/Makefile doesn't honor ${docdir}.