From da9a11a3ad14d5a4cbfe9b52d108b672a6939d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Mon, 10 Apr 2017 14:27:03 +0200 Subject: [PATCH] Introduce build-condition for running optional tests --- perl-Software-License.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/perl-Software-License.spec b/perl-Software-License.spec index 90bd78c..6999b66 100644 --- a/perl-Software-License.spec +++ b/perl-Software-License.spec @@ -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 optional tests +%bcond_without perl_Software_License_enables_optional_test Name: perl-Software-License Version: 0.103012 @@ -35,7 +37,7 @@ BuildRequires: perl(Test::More) BuildRequires: perl(Test::Pod) BuildRequires: perl(Try::Tiny) # Optional Tests -%if 0%{!?perl_bootstrap:1} && 0%{?fedora} +%if 0%{!?perl_bootstrap:1} && 0%{?fedora} && %{with perl_Software_License_enables_optional_test} BuildRequires: perl(CPAN::Meta) >= 2.120900 BuildRequires: perl(Software::License::CCpack) %endif