From ea8941bbbef5e6709cb44266cd8bf9950fb3b2c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 6 Dec 2017 17:27:10 +0100 Subject: [PATCH] Add build-conditions to control running additional tests --- perl-Test-Fatal.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/perl-Test-Fatal.spec b/perl-Test-Fatal.spec index cdea102..89bea92 100644 --- a/perl-Test-Fatal.spec +++ b/perl-Test-Fatal.spec @@ -1,3 +1,8 @@ +# Run extra test +%bcond_without perl_Test_Fatal_enables_extra_test +# Run optional test +%bcond_without perl_Test_Fatal_enables_optional_test + Summary: Incredibly simple helpers for testing code with exceptions Name: perl-Test-Fatal Version: 0.014 @@ -23,10 +28,14 @@ BuildRequires: perl(File::Spec) BuildRequires: perl(overload) BuildRequires: perl(Test::Builder::Tester) BuildRequires: perl(Test::More) >= 0.96 +%if %{with perl_Test_Fatal_enables_optional_test} # Optional Tests BuildRequires: perl(CPAN::Meta) >= 2.120900 +%endif +%if %{with perl_Test_Fatal_enables_extra_test} # Extra Tests BuildRequires: perl(Test::Pod) >= 1.41 +%endif # Runtime Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(Test::Builder) @@ -53,7 +62,9 @@ find %{buildroot} -type f -name .packlist -exec rm -f {} ';' %check make test +%if %{with perl_Test_Fatal_enables_extra_test} make test TEST_FILES="$(echo $(find xt/ -name '*.t'))" +%endif %files %license LICENSE