Disable Internet tests in 200_ping_tcp, bug #1903747

This commit is contained in:
Jitka Plesnikova 2020-12-03 13:57:29 +01:00
parent 6ff68734c3
commit 8e86c060cf
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,14 @@
diff -up Net-Ping-2.74/t/200_ping_tcp.t.orig Net-Ping-2.74/t/200_ping_tcp.t
--- Net-Ping-2.74/t/200_ping_tcp.t.orig 2020-12-03 12:50:50.645715613 +0100
+++ Net-Ping-2.74/t/200_ping_tcp.t 2020-12-03 12:53:14.305039861 +0100
@@ -1,8 +1,8 @@
use strict;
BEGIN {
- if ($ENV{PERL_CORE}) {
- unless ($ENV{PERL_TEST_Net_Ping}) {
+ if ($ENV{NO_NETWORK_TESTING} ||
+ ($ENV{PERL_CORE} && !$ENV{PERL_TEST_Net_Ping})) {
print "1..0 # Skip: network dependent test\n";
exit;
}

View File

@ -1,6 +1,6 @@
Name: perl-Net-Ping
Version: 2.74
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Check a remote host for reachability
License: GPL+ or Artistic
URL: https://metacpan.org/release/Net-Ping/
@ -11,6 +11,8 @@ Patch0: Net-Ping-2.74-Use-non-routable-addreses-for-negative-tests.patch
# Disable Internet tests with NO_NETWORK_TESTING, bug #1898132,
# proposed to the upstream, <https://github.com/rurban/Net-Ping/pull/24>
Patch1: Net-Ping-2.74-Disable-all-network-tests-with-NO_NETWORK_TESTING-1.patch
# Disable Internet tests in 200_ping_tcp, bug #1903747
Patch2: Net-Ping-2.74-Disable-all-network-tests-in-200_ping_tcp.patch
BuildArch: noarch
BuildRequires: coreutils
BuildRequires: make
@ -64,6 +66,7 @@ a network.
%setup -q -n Net-Ping-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
unset PERL_CORE
@ -86,5 +89,8 @@ make test
%{_mandir}/man3/*
%changelog
* Thu Dec 03 2020 Jitka Plesnikova <jplesnik@redhat.com> - 2.74-2
- Disable network tests in 200_tcp_ping
* Mon Nov 16 2020 Petr Pisar <ppisar@redhat.com> 2.74-1
- Specfile autogenerated by cpanspec 1.78.