From f94e06c6cfb7d1cb18ab8ff6e43333b7ffc9ef07 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Sat, 16 Jun 2018 22:11:18 -0400 Subject: run test suite in %check Run the test suite by default to help avoid shipping broken packages. --- cgit.spec | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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 - make config: drop redundant DESTDIR/INSTALL, add COPYTREE -- cgit