Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : enter_the_matrix
---------------------------------------------------------------
commit 14464fde5b1c6e45bd8aabb4db2254f09bedb2df
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Nov 14 15:06:09 2013 +0100
[spec] enable/disable test using variable
---------------------------------------------------------------
copr.spec | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/copr.spec b/copr.spec
index 4becc12..5203312 100644
--- a/copr.spec
+++ b/copr.spec
@@ -1,3 +1,4 @@
+%global with_test 0
%if 0%{?rhel} < 7 && 0%{?rhel} > 0
%global _pkgdocdir %{_docdir}/%{name}-%{version}
%endif
@@ -260,12 +261,14 @@ install -p -m 644 man/%{name}-selinux-enable.8
%{buildroot}/%{_mandir}/man8/
install -p -m 644 man/%{name}-selinux-relabel.8 %{buildroot}/%{_mandir}/man8/
%check
-pushd coprs_frontend
-TMPFILE=$(mktemp)
-COPR_CONFIG="$(pwd)/config/copr_unit_test.conf" ./manage.py test | tee
$TMPFILE
-# remove this when tests are fixed
-grep "1 failed, 65 passed" $TMPFILE
-popd
+%if ! 0%{?with_test:1}
+ pushd coprs_frontend
+ TMPFILE=$(mktemp)
+ COPR_CONFIG="$(pwd)/config/copr_unit_test.conf" ./manage.py test | tee
$TMPFILE
+ # remove this when tests are fixed
+ grep "1 failed, 65 passed" $TMPFILE
+ popd
+%endif
%pre backend
getent group copr >/dev/null || groupadd -r copr