[bug#34592] gnu: python-fenics-dijitso: Fix build.

Message ID 1550664967-441-1-git-send-email-pgarlick@tourbillion-technology.com
State Accepted
Commit 7a82074ca6cc616bc26dbc8b343cdd49406afeca
Headers show
Series [bug#34592] gnu: python-fenics-dijitso: Fix build. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied

Commit Message

Paul Garlick Feb. 20, 2019, 12:16 p.m. UTC
* gnu/packages/simulation.scm (python-fenics-dijitso)[arguments]: Skip
parallel tests.
---
 gnu/packages/simulation.scm | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Ricardo Wurmus Feb. 20, 2019, 8:40 p.m. UTC | #1
Paul Garlick <pgarlick@tourbillion-technology.com> writes:

> * gnu/packages/simulation.scm (python-fenics-dijitso)[arguments]: Skip
> parallel tests.
> ---
>  gnu/packages/simulation.scm | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
> index 20b62f3..3637cc3 100644
> --- a/gnu/packages/simulation.scm
> +++ b/gnu/packages/simulation.scm
> @@ -268,6 +268,11 @@ problems for efficient solution on parallel systems.")
>               (setenv "PYTHONPATH"
>                       (string-append (getcwd) ":" (getenv "PYTHONPATH")))
>               (with-directory-excursion "test"
> +               ;; Disable parallel tests to avoid race condition.  See
> +               ;; https://github.com/pytest-dev/pytest-cov/issues/237.
> +               (substitute* "runtests.sh"
> +                 (("for p in 1 4 8 16; do")
> +                  "for p in 1; do"))
>                 (invoke "./runtests.sh"))
>               #t)))))
>      (home-page "https://bitbucket.org/fenics-project/dijitso/")

I wondered if we could use the #:parallel-tests? argument instead, but
the python-build-system does not support it.  This approach looks fine
to me.

Thanks!

I pushed it to the master branch with commit 7a82074ca6.

--
Ricardo

Patch

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 20b62f3..3637cc3 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -268,6 +268,11 @@  problems for efficient solution on parallel systems.")
              (setenv "PYTHONPATH"
                      (string-append (getcwd) ":" (getenv "PYTHONPATH")))
              (with-directory-excursion "test"
+               ;; Disable parallel tests to avoid race condition.  See
+               ;; https://github.com/pytest-dev/pytest-cov/issues/237.
+               (substitute* "runtests.sh"
+                 (("for p in 1 4 8 16; do")
+                  "for p in 1; do"))
                (invoke "./runtests.sh"))
              #t)))))
     (home-page "https://bitbucket.org/fenics-project/dijitso/")