From 39a95b7f870d85a68692d64820427b757c4edfcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 16 Nov 2016 09:45:02 +0100 Subject: [PATCH] Simplify running tests There is no need to run the tests both by setup.py and nose: it just runs the same tests twice. Also, generating coverage data is useless and it will not be visible anywhere anyway. This allows us to get rid of one build requires. Also we should first run unittests and only then build the data for dummy compose: if the tests fail, we get the info earlier. --- pungi.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pungi.spec b/pungi.spec index 28cd987b..defb781c 100644 --- a/pungi.spec +++ b/pungi.spec @@ -11,7 +11,7 @@ Source0: https://pagure.io/releases/%{name}/%{name}-%{version}.tar.bz2 Patch0: 0001-pungi-Fix-tests-on-non-x86_64-arches.patch Patch1: 0002-pungi-Fix-incorrectly-skipped-tests.patch -BuildRequires: python-nose, python-nose-cov, python-mock +BuildRequires: python-nose, python-mock BuildRequires: python-devel, python-setuptools, python2-productmd BuildRequires: python-lockfile, kobo, kobo-rpmlib, python-kickstart, createrepo_c BuildRequires: python-lxml, libselinux-python, yum-utils, lorax @@ -77,9 +77,8 @@ gzip _build/man/pungi.1 %{__install} -m 0644 doc/_build/man/pungi.1.gz %{buildroot}%{_mandir}/man1 %check +nosetests --exe ./tests/data/specs/build.sh -%{__python} setup.py test -nosetests --exe --with-cov --cov-report html --cov-config tox.ini cd tests && ./test_compose.sh %files