File: no-network.patch

package info (click to toggle)
libio-socket-multicast6-perl 0.03-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 188 kB
  • ctags: 19
  • sloc: perl: 282; makefile: 4
file content (48 lines) | stat: -rw-r--r-- 1,372 bytes parent folder | download
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Description: skip tests which need internet access
Origin: vendor
Forwarded: not needed
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2015-06-09

--- a/t/30send.t
+++ b/t/30send.t
@@ -18,7 +18,10 @@
 						ReuseAddr=>1);
 ok( $sock4, "Create IPv4 multicast socket" );
 
+SKIP: {
+skip 'Tests require internet', 1 if $ENV{NO_NETWORK};
 is($sock4->send( 'Hello World!'), 12, "Sent 12 bytes on IPv4 socket." );
+}
 
 
 
@@ -30,4 +33,7 @@
 						ReuseAddr=>1);
 ok( $sock6, "Create IPv6 multicast socket" );
 
+SKIP: {
+skip 'Tests require internet', 1 if $ENV{NO_NETWORK};
 is($sock6->send( 'Hello World!'), 12, "Sent 12 bytes on IPv6 socket." );
+}
--- a/t/35mcastsend.t
+++ b/t/35mcastsend.t
@@ -26,7 +26,10 @@
 $sock4->mcast_dest( pack_sockaddr_in(2000,inet_pton(AF_INET, '239.255.30.29')) );
 ok( defined $sock4->mcast_dest(), "Packed IPv4 destination address and port" );
 
+SKIP: {
+skip 'Tests require internet', 1 if $ENV{NO_NETWORK};
 is($sock4->mcast_send( 'Hello World!' ), 12, "Sent 12 bytes on IPv4 socket." );
+}
 
 
 
@@ -43,4 +46,7 @@
 $sock6->mcast_dest( pack_sockaddr_in6(2000,inet_pton(AF_INET6, 'ff15::5042')) );
 ok( defined $sock6->mcast_dest(), "Packed IPv6 destination address and port" );
 
+SKIP: {
+skip 'Tests require internet', 1 if $ENV{NO_NETWORK};
 is($sock6->mcast_send( 'Hello World!' ), 12, "Sent 12 bytes on IPv6 socket." );
+}