From 7b062a97a7dc6e556159da9d9652d347e1e75ee9 Mon Sep 17 00:00:00 2001 From: Petr Písař Date: Jun 13 2018 06:20:02 +0000 Subject: Control running extra tests with a condition --- diff --git a/perl-YAML.spec b/perl-YAML.spec index c523c12..92d4183 100644 --- a/perl-YAML.spec +++ b/perl-YAML.spec @@ -4,6 +4,12 @@ %else %bcond_with perl_YAML_enables_test %endif +# Run extra test +%if ! (0%{?rhel}) +%bcond_without perl_YAML_enables_extra_test +%else +%bcond_with perl_YAML_enables_extra_test +%endif Name: perl-YAML Version: 1.26 @@ -43,9 +49,11 @@ BuildRequires: perl(Test::Deep) BuildRequires: perl(Test::More) >= 0.88 BuildRequires: perl(Test::YAML) >= 1.05 BuildRequires: perl(utf8) +%if %{with perl_YAML_enables_extra_test} # Author Tests BuildRequires: perl(Test::Pod) >= 1.41 %endif +%endif # Runtime Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(B::Deparse) @@ -77,7 +85,7 @@ make install DESTDIR=%{buildroot} %check # Avoid circular build deps Test::YAML → Test::Base → YAML when bootstrapping %if %{with perl_YAML_enables_test} && !%{defined perl_bootstrap} -make test AUTHOR_TESTING=1 +make test AUTHOR_TESTING=%{with perl_YAML_enables_extra_test} %endif %files