Control test by a build condition

perl-YAML tests have enormous dependency tree. We are not proud of it
but when packaging a subset of Perl packages (e.g. into a Modalarity
module), we need to cut off the dependency tree somewhere. Run-time
dependencies of perl-Test-YAML is one of the place.
This commit is contained in:
Petr Písař 2017-12-12 13:56:59 +01:00
parent efe039389b
commit 2282d3f47f

View File

@ -1,3 +1,6 @@
# Run test
%bcond_without perl_YAML_enables_test
Name: perl-YAML
Version: 1.24
Release: 1%{?dist}
@ -24,7 +27,7 @@ BuildRequires: perl(strict)
BuildRequires: perl(warnings)
# Test Suite
# Avoid circular build deps Test::YAML → Test::Base → YAML when bootstrapping
%if !%{defined perl_bootstrap}
%if %{with perl_YAML_enables_test} && !%{defined perl_bootstrap}
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(File::Find)
BuildRequires: perl(IO::File)
@ -65,7 +68,7 @@ make install DESTDIR=%{buildroot}
%check
# Avoid circular build deps Test::YAML → Test::Base → YAML when bootstrapping
%if !%{defined perl_bootstrap}
%if %{with perl_YAML_enables_test} && !%{defined perl_bootstrap}
make test
%endif