[mpi4py] Add FULLTESTS macro for running tests with just 1 core

Thomas Spura tomspur at fedoraproject.org
Sat Mar 14 14:04:17 UTC 2015


commit b34abd6578ff6feebd2910c97f10b0dcc4001534
Author: Thomas Spura <thomas.spura at gmail.com>
Date:   Sat Mar 14 15:03:53 2015 +0100

    Add FULLTESTS macro for running tests with just 1 core

 mpi4py.spec | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/mpi4py.spec b/mpi4py.spec
index ca610f3..8ef94aa 100644
--- a/mpi4py.spec
+++ b/mpi4py.spec
@@ -31,6 +31,8 @@
 # * OPENMPI:   if '1' enable openmpi
 %global MPICH 0
 %global OPENMPI 0
+# Run full testsuite or just with 1 core
+%global FULLTESTS 0
 
 Name:           mpi4py
 Version:        1.3.1
@@ -281,10 +283,12 @@ mv build mpich
 %{_openmpi_load}
 PYTHONPATH=%{buildroot}%{python2_sitearch}/openmpi \
     mpiexec -np 1 python2 test/runtests.py
+%if 0%{?FULLTESTS}
 PYTHONPATH=%{buildroot}%{python2_sitearch}/openmpi \
     mpiexec -np 5 python2 test/runtests.py
 PYTHONPATH=%{buildroot}%{python2_sitearch}/openmpi \
     mpiexec -np 8 python2 test/runtests.py
+%endif
 %{_openmpi_unload}
 %endif
 
@@ -294,10 +298,12 @@ PYTHONPATH=%{buildroot}%{python2_sitearch}/openmpi \
 %{_mpich_load}
 PYTHONPATH=%{buildroot}%{python2_sitearch}/mpich \
     mpiexec -np 1 python2 test/runtests.py
+%if 0%{?FULLTESTS}
 PYTHONPATH=%{buildroot}%{python2_sitearch}/mpich \
     mpiexec -np 5 python2 test/runtests.py
 PYTHONPATH=%{buildroot}%{python2_sitearch}/mpich \
     mpiexec -np 8 python2 test/runtests.py
+%endif
 %{_mpich_unload}
 %endif
 %endif
@@ -308,10 +314,12 @@ PYTHONPATH=%{buildroot}%{python2_sitearch}/mpich \
 %{_openmpi_load}
 PYTHONPATH=%{buildroot}%{python3_sitearch}/openmpi \
     mpiexec -np 1 python3 test/runtests.py
+%if 0%{?FULLTESTS}
 PYTHONPATH=%{buildroot}%{python3_sitearch}/openmpi \
     mpiexec -np 5 python3 test/runtests.py
 PYTHONPATH=%{buildroot}%{python3_sitearch}/openmpi \
     mpiexec -np 8 python3 test/runtests.py
+%endif
 %{_openmpi_unload}
 %endif
 
@@ -321,10 +329,12 @@ PYTHONPATH=%{buildroot}%{python3_sitearch}/openmpi \
 %{_mpich_load}
 PYTHONPATH=%{buildroot}%{python3_sitearch}/mpich \
     mpiexec -np 1 python3 test/runtests.py
+%if 0%{?FULLTESTS}
 PYTHONPATH=%{buildroot}%{python3_sitearch}/mpich \
     mpiexec -np 5 python3 test/runtests.py
 PYTHONPATH=%{buildroot}%{python3_sitearch}/mpich \
     mpiexec -np 8 python3 test/runtests.py
+%endif
 %{_mpich_unload}
 %endif
 %endif # mpich disable


More information about the scm-commits mailing list