From 779c0c57d286686bacc8ef6369d880218322144f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 12 Dec 2017 13:07:32 +0100 Subject: [PATCH] Control extra test with a build condition --- perl-Test-Requires.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/perl-Test-Requires.spec b/perl-Test-Requires.spec index 1285ffc..f5488c2 100644 --- a/perl-Test-Requires.spec +++ b/perl-Test-Requires.spec @@ -1,3 +1,6 @@ +# Run extra test +%bcond_without perl_Test_Requires_enables_extra_test + # Only need manual requires for "use base XXX;" prior to rpm 4.9 %global rpm49 0%(rpm --version | perl -p -e 's/^.* (\\d+)\\.(\\d+).*/sprintf("%d.%03d",$1,$2) ge 4.009 ? 1 : 0/e') @@ -26,12 +29,14 @@ BuildRequires: perl(warnings) # Test Suite BuildRequires: perl(Data::Dumper) BuildRequires: perl(Test::More) >= 0.47 +%if %{with perl_Test_Requires_enables_extra_test} # Extra Tests %if 0%{!?perl_bootstrap:1} && 0%{!?rhel:1} # Test::Perl::Critic -> Perl::Critic -> PPIx::Regexp -> Test::Kwalitee -> # Module::CPANTS::Analyse -> Test::Warn -> Sub::Uplevel -> Pod::Wordlist::hanekomu -> Test::Requires BuildRequires: perl(Test::Perl::Critic) %endif +%endif # Runtime Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %if ! %{rpm49} @@ -59,7 +64,9 @@ find %{buildroot} -type f -name .packlist -exec rm -f {} ';' %check # note the "skipped" warnings indicate success :) make test +%if %{with perl_Test_Requires_enables_extra_test} make test TEST_FILES="xt/*.t" +%endif %clean rm -rf %{buildroot}