Introduce build-condition for gnup1 tests

And disable the tests by default because they need a network access.
This commit is contained in:
Petr Písař 2017-04-05 10:37:09 +02:00
parent be3831d860
commit 470e724236
1 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,7 @@
# Don not run gnupg1 tests by default, they need network access
# (Socket::inet_aton('pool.sks-keyservers.net')).
%bcond_with perl_CPAN_enables_gnupg_test
Name: perl-CPAN
Version: 2.16
Release: 1%{?dist}
@ -109,10 +113,14 @@ BuildRequires: perl(Expect)
BuildRequires: perl(Hash::Util)
%if !%{defined perl_bootstrap}
# Kwalify not yet packaged
%if %{with perl_CPAN_enables_gnupg_test}
BuildRequires: perl(Module::Signature) >= 0.66
%endif
BuildRequires: perl(Perl::Version)
%endif
%if %{with perl_CPAN_enables_gnupg_test}
BuildRequires: perl(Socket)
%endif
%if !%{defined perl_bootstrap}
BuildRequires: perl(Sort::Versions)
# Test::MinimumVersion not used