Control running addiotional tests with build conditions

This commit is contained in:
Petr Písař 2017-12-07 13:32:45 +01:00
parent 54aa444d4a
commit 0cc50dbe19

View File

@ -1,3 +1,8 @@
# Run extra test
%bcond_without perl_Module_Implementation_enables_extra_test
# Run optional test
%bcond_without perl_Module_Implementation_enables_optional_test
Name: perl-Module-Implementation
Version: 0.09
Release: 14%{?dist}
@ -35,6 +40,7 @@ BuildRequires: perl(lib)
BuildRequires: perl(Test::Fatal) >= 0.006
BuildRequires: perl(Test::More) >= 0.96
BuildRequires: perl(Test::Requires)
%if %{with perl_Module_Implementation_enables_optional_test}
# ===================================================================
# Optional test requirements
# ===================================================================
@ -44,6 +50,8 @@ BuildRequires: perl(CPAN::Meta) >= 2.120900
BuildRequires: perl(Test::CleanNamespaces)
%endif
BuildRequires: perl(Test::Taint)
%endif
%if %{with perl_Module_Implementation_enables_extra_test}
# ===================================================================
# Author/Release test requirements
# ===================================================================
@ -65,6 +73,7 @@ BuildRequires: perl(Test::Pod::No404s)
BuildRequires: perl(Test::Spelling) >= 0.12
%endif
%endif
%endif
# ===================================================================
# Runtime requirements
# ===================================================================
@ -98,12 +107,16 @@ find %{buildroot} -type f -name .packlist -delete
%if %{defined perl_bootstrap}
make test
%else
%if %{with perl_Module_Implementation_enables_extra_test}
# Don't run the author tests for EL builds (see above)
%if ! 0%{?rhel}
make test AUTHOR_TESTING=1 RELEASE_TESTING=1
%else
make test RELEASE_TESTING=1
%endif
%else
make test
%endif
%endif
%files