[libnet-mac-vendor-perl] 05/08: Update no-network-tests.patch.

gregor herrmann gregoa at debian.org
Tue Jan 2 00:08:57 UTC 2018


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libnet-mac-vendor-perl.

commit f17be0dfdb294c0146bab544747f1abbe309f34d
Author: gregor herrmann <gregoa at debian.org>
Date:   Tue Jan 2 01:05:03 2018 +0100

    Update no-network-tests.patch.
---
 debian/patches/no-network-tests.patch | 69 ++++++++++++++---------------------
 1 file changed, 28 insertions(+), 41 deletions(-)

diff --git a/debian/patches/no-network-tests.patch b/debian/patches/no-network-tests.patch
index 68d31bb..8106852 100644
--- a/debian/patches/no-network-tests.patch
+++ b/debian/patches/no-network-tests.patch
@@ -2,7 +2,7 @@ Description: skip tests that need internet access, if NO_NETWORK is set
 Forwarded: not-needed
 Author: Nuno Carvalho <smash at cpan.org>
 Reviewed-by: gregor herrmann <gregoa at debian.org>
-Last-Update: 2015-11-08
+Last-Update: 2018-01-02
 
 --- a/t/fetch_oui_from_ieee.t
 +++ b/t/fetch_oui_from_ieee.t
@@ -25,44 +25,15 @@ Last-Update: 2015-11-08
  done_testing();
 --- a/t/fetch_oui.t
 +++ b/t/fetch_oui.t
-@@ -19,9 +19,12 @@
- 
- my $connected = 0;
- subtest connected => sub {
-+	SKIP: {
-+	skip 'Tests require internet', 1 if $ENV{NO_NETWORK};
- 	my $tx = $class->ua->head( Net::MAC::Vendor::oui_url() );
- 	$connected = $tx->success && $tx->res->code;
- 	ok( $connected, "Am connected to network [$connected]" );
-+	}
+@@ -17,7 +17,7 @@
+ 	ok( ! -e 'mac_oui.db', "Cache file has been unlinked" );
  	};
  
- my @ouis = qw(
-@@ -38,6 +41,7 @@
- 
- subtest fetch_apple => sub {
- 	SKIP: {
-+		skip 'Tests require internet', 4 if $ENV{NO_NETWORK};
- 		my $parsed = Net::MAC::Vendor::fetch_oui( $ouis[0] );
- 		skip "Can't connect to the IEEE web site for $ouis[0]", 4 unless defined $parsed;
- 
-@@ -49,6 +53,8 @@
- 	};
- 
- subtest fetch_all => sub {
-+	SKIP: {
-+	skip 'Tests require internet', 4 if $ENV{NO_NETWORK};
- 	foreach my $oui ( @ouis ) {
- 		subtest $oui => sub {
- 			my $parsed = Net::MAC::Vendor::fetch_oui( $oui );
-@@ -61,6 +67,7 @@
- 				}
- 			};
- 		}
-+	}
+-my $connected = do {
++my $connected = $ENV{NO_NETWORK} ? 0 : do {
+ 	my $tx = $class->ua->head( Net::MAC::Vendor::oui_url() );
+ 	$tx->success && $tx->res->code;
  	};
- 
- 
 --- a/t/run.t
 +++ b/t/run.t
 @@ -6,7 +6,9 @@
@@ -96,14 +67,30 @@ Last-Update: 2015-11-08
  subtest created_source => sub {
 --- a/t/oui.t
 +++ b/t/oui.t
-@@ -22,8 +22,11 @@
- 	};
+@@ -23,7 +23,7 @@
+ 
  
  subtest fetch_url => sub {
+-	my $connected = do {
++	my $connected = $ENV{NO_NETWORK} ? 0 : do {
+ 		my $tx = $class->ua->head( Net::MAC::Vendor::oui_url() );
+ 		$tx->success && $tx->res->code;
+ 		};
+--- a/t/fetch_oui_from_custom.t
++++ b/t/fetch_oui_from_custom.t
+@@ -11,6 +11,8 @@
+ 	};
+ 
+ subtest fetch => sub {
 +	SKIP: {
-+	skip 'Tests require internet', 1 if $ENV{NO_NETWORK};
- 	my $tx = $class->ua->head( $class->oui_url );
- 	ok( $tx->success, "Fetching URL was a success" );
++	skip 'Tests require internet', 6 if $ENV{NO_NETWORK};
+ 	my $i = 0;
+ 	for my $url (undef, 'http://standards.ieee.org/cgi-bin/ouisearch?14-10-9F', undef) {
+ 		if ($i > 1) { $ENV{NET_MAC_VENDOR_OUI_SOURCE} = 
+@@ -26,6 +28,7 @@
+ 			}
+ 		$i++;
+ 		}
 +	}
  	};
  

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnet-mac-vendor-perl.git



More information about the Pkg-perl-cvs-commits mailing list