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 7142799715421d493c77ffe6a03360afad3ab1ea
Author: gregor herrmann <gre...@debian.org>
Date:   Sun Nov 8 19:18:59 2015 +0100

    Update no-network-tests.patch.
    
    The test suite was restructured a bit.
---
 debian/patches/no-network-tests.patch | 144 +++++++++++++++++++++-------------
 1 file changed, 91 insertions(+), 53 deletions(-)

diff --git a/debian/patches/no-network-tests.patch 
b/debian/patches/no-network-tests.patch
index 28c7c6e..8e9e18f 100644
--- a/debian/patches/no-network-tests.patch
+++ b/debian/patches/no-network-tests.patch
@@ -6,53 +6,61 @@ Last-Update: 2015-07-09
 
 --- a/t/fetch_oui_from_ieee.t
 +++ b/t/fetch_oui_from_ieee.t
-@@ -5,13 +5,17 @@
- use_ok( $class );
- ok( defined &{"${class}::fetch_oui_from_ieee"}, "&fetch_oui_from_ieee is 
defined" );
+@@ -9,6 +9,8 @@
+       };
  
--my $array = Net::MAC::Vendor::fetch_oui_from_ieee( '00:01:02' );
--isa_ok( $array, ref [], "Got back array reference" );
-+SKIP: {
-+  skip 'Tests require internet', 3 if $ENV{NO_NETWORK};
- 
--my $html = join "\n", @$array;
-+  my $array = Net::MAC::Vendor::fetch_oui_from_ieee( '00:01:02' );
-+  isa_ok( $array, ref [], "Got back array reference" );
+ subtest fetch => sub {
++      SKIP: {
++      skip 'Tests require internet', 3 if $ENV{NO_NETWORK};
+       my $array = Net::MAC::Vendor::fetch_oui_from_ieee( '00:01:02' );
+       isa_ok( $array, ref [], "Got back array reference" );
+ #     diag( "Array from fetch_oui_from_ieee is " . Dumper( $array ) );
+@@ -18,6 +20,7 @@
+       like( $html, qr/3COM CORPORATION/, "Fetched 3M's OUI entry" );
  
--like( $html, qr/3COM CORPORATION/, "Fetched 3M's OUI entry" );
-+  my $html = join "\n", @$array;
- 
--unlike( $html, qr/PRIVATE/, "Still see PRIVATE in 3M entry" );
-+  like( $html, qr/3COM CORPORATION/, "Fetched 3M's OUI entry" );
-+
-+  unlike( $html, qr/PRIVATE/, "Still see PRIVATE in 3M entry" );
-+}
+       unlike( $html, qr/PRIVATE/, "Still see PRIVATE in 3M entry" );
++      }
+       };
  
  done_testing();
 --- a/t/fetch_oui.t
 +++ b/t/fetch_oui.t
-@@ -13,15 +13,19 @@
- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
--my $connected = head( 'https://standards.ieee.org/regauth/oui/oui.txt' );
-+SKIP: {
-+  skip 'Tests require internet', 1 if $ENV{NO_NETWORK};
-+
-+  my $connected = head( 'https://standards.ieee.org/regauth/oui/oui.txt' );
+@@ -18,8 +18,11 @@
+ my $connected = 0;
+ subtest connected => sub {
+       my $tx = $class->ua->head( Net::MAC::Vendor::oui_url() );
++      SKIP: {
++      skip 'Tests require internet', 1 if $ENV{NO_NETWORK};
+       $connected = $tx->success;
+       ok( $connected, "Am connected to network [$connected]" );
++      }
+       };
+ 
+ my @ouis = qw(
+@@ -36,6 +39,7 @@
  
--ok( defined $connected, "Am connected to network" );
-+  ok( defined $connected, "Am connected to network" );
-+}
+ subtest fetch_apple => sub {
+       SKIP: {
++              skip 'Tests require internet', 4 if $ENV{NO_NETWORK};
+               skip "Can't connect to the IEEE web site", 4 unless $connected;
  
- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- SKIP: {
--skip "Can't connect to the IEEE web site", 4 unless $connected;
-+skip "Can't connect to the IEEE web site", 4 unless ($connected or 
$ENV{NO_NETWORK});
+               my $parsed = Net::MAC::Vendor::fetch_oui( $ouis[0] );
+@@ -47,6 +51,8 @@
+       };
+ 
+ subtest fetch_all => sub {
++      SKIP: {
++      skip 'Tests require internet', 4 if $ENV{NO_NETWORK};
+       foreach my $oui ( @ouis ) {
+               my $parsed = Net::MAC::Vendor::fetch_oui( $oui );
+               isa_ok( $parsed, ref [] );
+@@ -54,6 +60,7 @@
+                       is( $parsed->[$i], $lines->[$i], "Line $i matches for 
$oui" );
+                       }
+               }
++      }
+       };
  
- Net::MAC::Vendor::fetch_oui( $oui[0] );
  
 --- a/t/rt79369.t
 +++ b/t/rt79369.t
@@ -64,6 +72,19 @@ Last-Update: 2015-07-09
                my $array = Net::MAC::Vendor::lookup( $private_mac );
                skip 'Could not fetch MAC data', 2 unless defined $array;
  
+@@ -26,9 +27,12 @@
+ 
+       ok( Net::MAC::Vendor::load_cache( $file ), 'Cache is loaded' );
+ 
++      SKIP: {
++      skip 'Tests require internet', 2 if $ENV{NO_NETWORK};
+       my $array = Net::MAC::Vendor::lookup( $private_mac );
+       isa_ok( $array, ref [], "Got back array reference" );
+       is( uc $array->[0], 'PRIVATE', 'This is a private entry' );
++      }
+       };
+ 
+ done_testing();
 --- a/t/run.t
 +++ b/t/run.t
 @@ -6,7 +6,9 @@
@@ -77,22 +98,39 @@ Last-Update: 2015-07-09
  local *STDOUT;
  
  open STDOUT, ">", \ my $output;
+diff --git a/t/load_cache.t b/t/load_cache.t
+index 072539d..d7690bb 100644
 --- a/t/load_cache.t
 +++ b/t/load_cache.t
-@@ -13,6 +13,9 @@
- is( $rc, undef, "load_cache returns undef for bad source [not_there.txt]");
- }
+@@ -25,12 +25,15 @@ subtest load_cache_default => sub {
+ my ($fh, $filename) = tempfile( UNLINK => 1 );
+ 
+ subtest load_cache_default_write => sub {
++      SKIP: {
++      skip 'Tests require internet', 2 if $ENV{NO_NETWORK};
+       local *STDERR;
+       open STDERR, ">:utf8", \my $output;
+       my $rc = Net::MAC::Vendor::load_cache(undef, $filename);
+       ok( $rc, "load_cache returns true for default source with write");
+ 
+       ok ( -s $filename, "load_cache results in file with size > 0");
++      }
+       };
+ 
+ subtest created_source => sub {
+diff --git a/t/oui.t b/t/oui.t
+index 94c742f..4e43160 100644
+--- a/t/oui.t
++++ b/t/oui.t
+@@ -20,8 +20,11 @@ subtest oui_url => sub {
+       };
+ 
+ subtest fetch_url => 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: {
-+skip 'Tests require internet', 3 if $ENV{NO_NETWORK};
-+
- {
- local *STDERR;
- open STDERR, ">", \my $output;
-@@ -37,4 +40,6 @@
- ok( $rc, "load_cache returns true read from created source");
- }
- 
-+} # end SKIP
-+
  done_testing();

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

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to