rpms/mpi4py/devel mpi4py.spec,1.1,1.2

tomspur tomspur at fedoraproject.org
Fri Feb 26 13:47:57 UTC 2010


Author: tomspur

Update of /cvs/pkgs/rpms/mpi4py/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7310

Modified Files:
	mpi4py.spec 
Log Message:
Partly enable the testsuite: MPD works now



Index: mpi4py.spec
===================================================================
RCS file: /cvs/pkgs/rpms/mpi4py/devel/mpi4py.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- mpi4py.spec	25 Feb 2010 19:56:07 -0000	1.1
+++ mpi4py.spec	26 Feb 2010 13:47:56 -0000	1.2
@@ -4,9 +4,19 @@
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
 
+### TESTSUITE ###
+# The testsuite currently fails only on the buildsystem, but works localy.
+# So to easy enable/disable the testsuite, I introduce the following
+#   variables:
+#
+# * MPD:       if '1' enable mpich2, which requires mpd to start
+# * OPENMPI:   if '1' enable openmpi
+%global MPD 1
+%global OPENMPI 0
+
 Name:           mpi4py
 Version:        1.2
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Python bindings of the Message Passing Interface (MPI)
 
 Group:          Development/Languages
@@ -21,6 +31,9 @@ BuildRequires:  python3-devel
 %endif
 Requires:       %{name}-common = %{version}-%{release}
 
+# for the testsuite: 'pwgen' is needed to create a random password
+BuildRequires:  pwgen
+
 
 
 %description
@@ -233,40 +246,66 @@ popd
 
 
 %check
-# disable tests completely
-%if 0
+# test openmpi?
+%if 0%{?OPENMPI}
 %{_openmpi_load}
 PYTHONPATH=%{buildroot}%{python_sitearch}/openmpi \
     python test/runalltest.py
 %{_openmpi_unload}
+%endif
 
-# mpd can't start -> disable
-%if 0
+# test mpd?
+%if 0%{?MPD}
 %{_mpich2_load}
+
+# create mpd.conf
+export MPD_CONF_FILE=mpd.conf
+echo MPD_SECRETWORD=$(pwgen -s 50 1) > mpd.conf
+chmod 600 mpd.conf
+
 mpd --daemon
 PYTHONPATH=%{buildroot}%{python_sitearch}/mpich2 \
     python test/runalltest.py
 mpdallexit
+
+# delte mpd.conf again
+rm mpd.conf
+unset MPD_CONF_FILE
+
+
 %{_mpich2_unload}
 %endif
 
 %if 0%{?with_python3}
+# test openmpi?
+%if 0%{?OPENMPI}
 %{_openmpi_load}
 PYTHONPATH=%{buildroot}%{python3_sitearch}/openmpi \
     python3 test/runalltest.py
 %{_openmpi_unload}
+%endif
 
-# mpd can't start -> disable
-%if 0
+# test mpd?
+%if 0%{?MPD}
 %{_mpich2_load}
+
+# create mpd.conf
+export MPD_CONF_FILE=mpd.conf
+echo MPD_SECRETWORD=$(pwgen -s 50 1) > mpd.conf
+chmod 600 mpd.conf
+
 mpd --daemon
 PYTHONPATH=%{buildroot}%{python3_sitearch}/mpich2 \
     python3 test/runalltest.py
 mpdallexit
+
+# delte mpd.conf again
+rm mpd.conf
+unset MPD_CONF_FILE
+
 %{_mpich2_unload}
 %endif # mpd disable
 %endif # with_python3
-%endif # disable tests
 
 %clean
 rm -rf %{buildroot}
@@ -304,6 +343,9 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Fri Feb 25 2010 Thomas Spura <tomspur at fedoraproject.org> - 1.2-7
+- introduce OPENMPI and MPD macros to easy enable/disable the testsuite
+
 * Tue Feb 16 2010 Thomas Spura <tomspur at fedoraproject.org> - 1.2-6
 - don't delete *.pyx/*.pyd
 - delete docs/source



More information about the scm-commits mailing list