Control additional test with a build condition

This commit is contained in:
Petr Písař 2017-12-12 10:32:58 +01:00
parent 65a9cf0595
commit ba1246283e

View File

@ -1,3 +1,12 @@
# Run extra test
%if 0%{!?perl_bootstrap:1}
%bcond_without perl_CPAN_Meta_YAML_enables_extra_test
%else
# Don't run extra tests when bootstrapping as many of those
# tests' dependencies build-require this package
%bcond_with perl_CPAN_Meta_YAML_enables_extra_test
%endif
Name: perl-CPAN-Meta-YAML
Version: 0.018
Release: 395%{?dist}
@ -40,10 +49,8 @@ BuildRequires: perl(lib)
BuildRequires: perl(Test::More) >= 0.96
BuildRequires: perl(utf8)
BuildRequires: perl(vars)
%if %{with perl_CPAN_Meta_YAML_enables_extra_test}
# Extra Tests:
# Don't run extra tests when bootstrapping as many of those
# tests' dependencies build-require this package
%if 0%{!?perl_bootstrap:1}
BuildRequires: perl(blib)
BuildRequires: perl(Test::CPAN::Meta)
BuildRequires: perl(Test::Pod)
@ -72,7 +79,7 @@ find %{buildroot} -type f -name .packlist -exec rm -f {} \;
%check
make test
%if 0%{!?perl_bootstrap:1}
%if %{with perl_CPAN_Meta_YAML_enables_extra_test}
make test TEST_FILES="xt/*/*.t"
%endif