File: disable-network-tests.patch

package info (click to toggle)
libsocket-perl 2.024-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 264 kB
  • ctags: 13
  • sloc: perl: 923; makefile: 5
file content (32 lines) | stat: -rw-r--r-- 1,138 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Description: skip network tests
Origin: vendor
Forwarded: not needed
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2016-08-12

--- a/t/getaddrinfo.t
+++ b/t/getaddrinfo.t
@@ -70,6 +70,7 @@
 my $goodhost = "cpan.perl.org";
 
 SKIP: {
+    skip "No network access during Debian builds", 2 if $ENV{NO_NETWORK};
     skip "Resolver has no answer for $goodhost", 2 unless gethostbyname( $goodhost );
 
     ( $err, @res ) = getaddrinfo( "cpan.perl.org", "ftp", { socktype => SOCK_STREAM } );
@@ -85,6 +86,7 @@
 # any request. We'd better check for them
 
 SKIP: {
+    skip "No network access during Debian builds", 1 if $ENV{NO_NETWORK};
     skip "Resolver has an answer for $missinghost", 1 if gethostbyname( $missinghost );
 
     # Some OSes return $err == 0 but no results
@@ -124,6 +126,7 @@
 # Now check that names with AI_NUMERICHOST fail
 
 SKIP: {
+    skip "No network access during Debian builds", 1 if $ENV{NO_NETWORK};
     skip "Resolver has no answer for $goodhost", 1 unless gethostbyname( $goodhost );
 
     ( $err, @res ) = getaddrinfo( $goodhost, "ftp", { flags => AI_NUMERICHOST, socktype => SOCK_STREAM } );