Control running extra test with a build condition
This commit is contained in:
parent
55436a6a30
commit
dcf7baa719
@ -1,5 +1,7 @@
|
||||
# We need to patch the test suite if we have an old version of Test::More
|
||||
%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0)
|
||||
# Run extra test
|
||||
%bcond_without perl_Package_Generator_enables_extra_test
|
||||
|
||||
Name: perl-Package-Generator
|
||||
Version: 1.106
|
||||
@ -21,8 +23,10 @@ BuildRequires: perl(Scalar::Util)
|
||||
# Test Suite
|
||||
BuildRequires: perl(Params::Util) >= 0.11
|
||||
BuildRequires: perl(Test::More) >= 0.47
|
||||
%if %{with perl_Package_Generator_enables_extra_test}
|
||||
# Extra Tests
|
||||
BuildRequires: perl(Test::Pod)
|
||||
%endif
|
||||
# Runtime
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||
|
||||
@ -50,7 +54,9 @@ find %{buildroot} -type f -name .packlist -exec rm -f {} \;
|
||||
|
||||
%check
|
||||
make test
|
||||
%if %{with perl_Package_Generator_enables_extra_test}
|
||||
make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user