diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2013-03-06 09:51:32 +0200 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2013-03-08 14:04:00 +0200 |
commit | 5caa726cf2ca8cf0defc21d6427fcd103120160d (patch) | |
tree | dc6c6a3579e29b2439ca0bdec90e2f82f86da172 | |
parent | 028a41cf9929057d606370e052264bba80669fe4 (diff) | |
download | git-buildpackage-5caa726cf2ca8cf0defc21d6427fcd103120160d.tar.gz git-buildpackage-5caa726cf2ca8cf0defc21d6427fcd103120160d.tar.bz2 git-buildpackage-5caa726cf2ca8cf0defc21d6427fcd103120160d.zip |
packaging: Add (conditional) %check section to spec
Add unittests - disabled by default. Also, make unittest build
requirements conditional.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rw-r--r-- | packaging/git-buildpackage.spec | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/packaging/git-buildpackage.spec b/packaging/git-buildpackage.spec index a9a07bc4..0ef50725 100644 --- a/packaging/git-buildpackage.spec +++ b/packaging/git-buildpackage.spec @@ -1,3 +1,5 @@ +%define do_unittests 0 + Name: git-buildpackage Summary: Build packages from git Version: 0.6.0git20121124 @@ -18,8 +20,10 @@ BuildRequires: python-setuptools BuildRequires: docbook-utils BuildRequires: gtk-doc BuildRequires: epydoc +%if 0%{?do_unittests} BuildRequires: python-coverage BuildRequires: python-nose +%endif %description Set of tools from Debian that integrate the package build system with Git. @@ -67,7 +71,7 @@ This package contains the tools for building RPM packages. %build -python ./setup.py build +WITHOUT_NOSETESTS=1 python ./setup.py build # Prepare apidocs epydoc -n git-buildpackage --no-sourcecode -o docs/apidocs/ \ @@ -77,10 +81,15 @@ epydoc -n git-buildpackage --no-sourcecode -o docs/apidocs/ \ HAVE_SGML2X=0 make -C docs/ +%if 0%{?do_unittests} +%check +GIT_CEILING_DIRECTORIES=%{_builddir} python setup.py nosetests +%endif + %install rm -rf %{buildroot} -python ./setup.py install --root=%{buildroot} --prefix=/usr +WITHOUT_NOSETESTS=1 python ./setup.py install --root=%{buildroot} --prefix=/usr rm -rf %{buildroot}%{python_sitelib}/*info |