diff --git a/sympy.spec b/sympy.spec index 58dc428..37d43bb 100644 --- a/sympy.spec +++ b/sympy.spec @@ -30,6 +30,7 @@ BuildRequires: tex(latex) BuildRequires: tex-dvipng BuildRequires: xorg-x11-fonts-Type1 BuildRequires: xorg-x11-server-Xvfb +BuildRequires: parallel Requires: mesa-libGLU Requires: python2-fastcache @@ -183,11 +184,21 @@ popd %check let "dnum = $RANDOM % 90 + 10" +# Split into many small chunks to reduce waiting in the end-game +jobs=%{?_smp_mflags}; jobs=${jobs#-j}; jobs=$((jobs * 3)) + pushd %{sympydir} -xvfb-run -a -n $dnum python2 setup.py test +xvfb-run -a -n $dnum \ + parallel %{?_smp_mflags} \ + %{__python2} bin/test -v --split {}/$jobs \ + ::: $(bash -c "echo {1..$jobs}") popd + pushd python3 -xvfb-run -a -n $dnum python3 setup.py test +xvfb-run -a -n $dnum \ + parallel %{?_smp_mflags} \ + %{__python3} bin/test -v --split {}/$jobs \ + ::: $(bash -c "echo {1..$jobs}") popd %files @@ -221,6 +232,9 @@ popd %{_docdir}/%{name}-doc/html %changelog +* Fri Jan 13 2017 Zbigniew Jędrzejewski-Szmek - 1.0-4 +- Run tests in parallel + * Thu Dec 22 2016 Miro Hrončok - 1.0-4 - Rebuild for Python 3.6