diff mbox series

[bug#54869,v2,1/7] gnu: fenics-dolfin: Honor #:tests? flag.

Message ID 20220422115258.63649-2-paul@apatience.com
State Accepted
Headers show
Series gnu: python-vedo: Update to 2022.2.0. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Paul A. Patience April 22, 2022, 11:53 a.m. UTC
* gnu/packages/simulation.scm (fenics-dolfin)[arguments]: Adjust custom
'check' phase to honor the #:tests? flag.
---
 gnu/packages/simulation.scm | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

--
2.35.1

Comments

M April 22, 2022, 5:46 p.m. UTC | #1
Paul A. Patience schreef op vr 22-04-2022 om 11:53 [+0000]:
> -                  (invoke "ctest" "-R" "demo" "-R" "mpi")))))))
> +           (lambda* (#:key tests? #:allow-other-keys)
> +             (when tests?
> +               (and (invoke "make" "unittests")
> +                    (invoke "make" "demos")
> +                    (invoke "ctest" "-R" "unittests")
> +                    (invoke "ctest" "-R" "demo" "-R" "serial")
> +                    (invoke "ctest" "-R" "demo" "-R" "mpi"))))))))

The 'and' is pointless, it can be removed --- IIUC, 'invoke' throws
exceptions, it doesn't return #false.  Anyway, honouring #:tests? is
nice (for cross-compilation and --without-tests=...).

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 3f2d8e136d..aebb6be15e 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -549,12 +549,13 @@  (define-public fenics-dolfin
                     ")\n") port)))
              #t))
          (replace 'check
-           (lambda _
-             (and (invoke "make" "unittests")
-                  (invoke "make" "demos")
-                  (invoke "ctest" "-R" "unittests")
-                  (invoke "ctest" "-R" "demo" "-R" "serial")
-                  (invoke "ctest" "-R" "demo" "-R" "mpi")))))))
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (and (invoke "make" "unittests")
+                    (invoke "make" "demos")
+                    (invoke "ctest" "-R" "unittests")
+                    (invoke "ctest" "-R" "demo" "-R" "serial")
+                    (invoke "ctest" "-R" "demo" "-R" "mpi"))))))))
     (home-page "https://bitbucket.org/fenics-project/dolfin/")
     (synopsis "Problem solving environment for differential equations")
     (description