From 01bd9f0b4b25b1486758b2d9e5f27fb804d56cee Mon Sep 17 00:00:00 2001 From: Petr Písař Date: Dec 12 2017 13:47:29 +0000 Subject: Control extra test with a build condition --- diff --git a/perl-Software-License.spec b/perl-Software-License.spec index afdee9f..585cf99 100644 --- a/perl-Software-License.spec +++ b/perl-Software-License.spec @@ -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