Control extra test with a build condition

This commit is contained in:
Petr Písař 2017-12-12 14:47:29 +01:00
parent 1b51d3fa82
commit 01bd9f0b4b
1 changed files with 16 additions and 3 deletions

View File

@ -1,5 +1,15 @@
# Run extra tests
%if 0%{?fedora} || 0%{?rhel} > 6
%bcond_without perl_Software_License_enables_extra_test
%else
%bcond_with perl_Software_License_enables_extra_test
%endif
# Run optional tests
%if 0%{!?perl_bootstrap:1} && 0%{?fedora}
%bcond_without perl_Software_License_enables_optional_test
%else
%bcond_with perl_Software_License_enables_optional_test
%endif
Name: perl-Software-License
Version: 0.103013
@ -30,13 +40,16 @@ BuildRequires: perl(warnings)
# Test Suite
BuildRequires: perl(File::Spec)
BuildRequires: perl(Test::More) >= 0.88
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Try::Tiny)
%if %{with perl_Software_License_enables_optional_test}
# Optional Tests
%if 0%{!?perl_bootstrap:1} && 0%{?fedora} && %{with perl_Software_License_enables_optional_test}
BuildRequires: perl(CPAN::Meta) >= 2.120900
BuildRequires: perl(Software::License::CCpack)
%endif
%if %{with perl_Software_License_enables_extra_test}
# Extra Tests
BuildRequires: perl(Test::Pod)
%endif
# Runtime
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
@ -57,7 +70,7 @@ find %{buildroot} -type f -name .packlist -delete
%check
make test
%if 0%{?fedora} || 0%{?rhel} > 6
%if %{with perl_Software_License_enables_extra_test}
make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
%endif