summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2018-06-16 22:11:18 -0400
committerTodd Zullinger <tmz@pobox.com>2018-06-16 23:24:22 -0400
commitf94e06c6cfb7d1cb18ab8ff6e43333b7ffc9ef07 (patch)
tree744097873f0dd0a7cd265ed660b1ac0975c6af3f
parentbb6278bfc29068aa2d10c733d9b21c80487859c0 (diff)
downloadcgit_EL6-f94e06c6cfb7d1cb18ab8ff6e43333b7ffc9ef07.tar.gz
run test suite in %check
Run the test suite by default to help avoid shipping broken packages.
-rw-r--r--cgit.spec24
1 files changed, 24 insertions, 0 deletions
diff --git a/cgit.spec b/cgit.spec
index 54530a3..e418075 100644
--- a/cgit.spec
+++ b/cgit.spec
@@ -1,5 +1,6 @@
# Review bug: https://bugzilla.redhat.com/479723
+# Defaults
%global gitver 2.10.2
%global cachedir %{_localstatedir}/cache/%{name}
%global filterdir %{_libexecdir}/%{name}/filters
@@ -10,6 +11,13 @@
# the *.py files in cgit are not importable python modules
%global _python_bytecompile_extra 0
+# Settings for Fedora and EL > 7
+%if 0%{?fedora} || 0%{?rhel} > 7
+%global use_perl_interpreter 1
+%else
+%global use_perl_interpreter 0
+%endif
+
# The highlight package is not available in epel-7-ppc64
%if 0%{?rhel} == 7 && %{_arch} == ppc64
%bcond_with highlight
@@ -58,6 +66,17 @@ BuildRequires: openssl-devel
BuildRequires: lua-devel
BuildRequires: make
+# Test dependencies
+BuildRequires: gettext
+%if %{use_perl_interpreter}
+BuildRequires: perl-interpreter
+%else
+BuildRequires: perl
+%endif
+BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: strace
+BuildRequires: tidy
+
%if %{with httpd_filesystem}
# httpd-filesystem provides the basic apache directory layout
Requires: httpd-filesystem
@@ -133,6 +152,10 @@ install -p -m0644 httpd.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/cgit.conf
install -d -m0755 %{buildroot}%{cachedir}
+%check
+make test
+
+
%files
%doc README* *.html
%license COPYING
@@ -162,6 +185,7 @@ install -d -m0755 %{buildroot}%{cachedir}
- simplify README.SELinux install
- use %%bcond_(with|without) to handle httpd-filesystem
- avoid libcrypto.so requires
+- run test suite in %%check
* Mon Jun 04 2018 Todd Zullinger <tmz@pobox.com>
- make config: drop redundant DESTDIR/INSTALL, add COPYTREE