Control extra test with a build condition

This commit is contained in:
Petr Písař 2017-12-07 13:14:26 +01:00
parent 3fc269d51f
commit e4d4e1fb78

View File

@ -1,3 +1,6 @@
# Run extra test
%bcond_without perl_CPAN_Meta_Check_enables_extra_test
Name: perl-CPAN-Meta-Check
Summary: Verify requirements in a CPAN::Meta object
Version: 0.014
@ -25,6 +28,7 @@ BuildRequires: perl(Env)
BuildRequires: perl(lib)
BuildRequires: perl(Test::Deep)
BuildRequires: perl(Test::More) >= 0.88
%if %{with perl_CPAN_Meta_Check_enables_extra_test}
# Extra tests
BuildRequires: perl(blib)
BuildRequires: perl(File::Spec)
@ -33,6 +37,7 @@ BuildRequires: perl(IPC::Open3)
BuildRequires: perl(Pod::Coverage::TrustPod)
BuildRequires: perl(Test::Pod) >= 1.41
BuildRequires: perl(Test::Pod::Coverage) >= 1.08
%endif
# Runtime
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
@ -52,7 +57,9 @@ make install DESTDIR=%{buildroot}
%check
make test
%if %{with perl_CPAN_Meta_Check_enables_extra_test}
make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
%endif
%files
%license LICENSE