From 9d69cb50081292e89a551440695cdbb606b77426 Mon Sep 17 00:00:00 2001 From: Petr Písař Date: Dec 06 2017 16:40:48 +0000 Subject: Introduce build-conditions to control additional test --- diff --git a/perl-B-Hooks-EndOfScope.spec b/perl-B-Hooks-EndOfScope.spec index ab618a0..5928642 100644 --- a/perl-B-Hooks-EndOfScope.spec +++ b/perl-B-Hooks-EndOfScope.spec @@ -1,3 +1,12 @@ +# Run extra test +%if 0%{!?perl_bootstrap:1} && 0%{?rhel} < 7 +%bcond_without perl_B_Hooks_EndOfScope_enables_extra_test +%else +%bcond_with perl_B_Hooks_EndOfScope_enables_extra_test +%endif +# Run optional test +%bcond_without perl_B_Hooks_EndOfScope_enables_optional_test + Name: perl-B-Hooks-EndOfScope Version: 0.21 Release: 5%{?dist} @@ -42,9 +51,11 @@ BuildRequires: perl(File::Spec) BuildRequires: perl(IPC::Open2) BuildRequires: perl(Module::Metadata) BuildRequires: perl(Test::More) >= 0.89 +%if %{with perl_B_Hooks_EndOfScope_enables_optional_test} # Optional Tests BuildRequires: perl(CPAN::Meta) >= 2.120900 BuildRequires: perl(CPAN::Meta::Prereqs) +%endif # Author/Release tests # Note: Test::Pod::No404s intentionally omitted as it would fail due to # missing connectivity in the koji build environment @@ -95,7 +106,7 @@ find %{buildroot} -type f -name .packlist -delete %check export AUTHOR_TESTING=1 make test -%if 0%{!?perl_bootstrap:1} && 0%{?rhel} < 7 +%if %{with perl_B_Hooks_EndOfScope_enables_extra_test} make test TEST_FILES="$(echo $(find xt/ -name '*.t'))" %endif