r52661 - in /trunk/libxml-stream-perl/debian: patches/series patches/t_upstream_tests.diff rules

franck at users.alioth.debian.org franck at users.alioth.debian.org
Fri Feb 12 23:49:07 UTC 2010


Author: franck
Date: Fri Feb 12 23:49:00 2010
New Revision: 52661

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=52661
Log:
* Added patch t_upstream_tests to disable tests which require a network
  access. Set NO_NETWORK=1 in d.rules to disable t/tcpip{,2ssl}.t. they
  might have caused #566590 in combination with:
  http://www.jabber.co.nz/2010/01/25/service-update-2010-01-24/

Added:
    trunk/libxml-stream-perl/debian/patches/t_upstream_tests.diff
Modified:
    trunk/libxml-stream-perl/debian/patches/series
    trunk/libxml-stream-perl/debian/rules

Modified: trunk/libxml-stream-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-stream-perl/debian/patches/series?rev=52661&op=diff
==============================================================================
--- trunk/libxml-stream-perl/debian/patches/series (original)
+++ trunk/libxml-stream-perl/debian/patches/series Fri Feb 12 23:49:00 2010
@@ -1,1 +1,74 @@
 gssapi.patch
+From: Franck Joncourt <franck.mail at dthconnex.com>
+Subject: [PATCH] t/upstream/tests
+
+<patch description>
+
+Signed-off-by: Franck Joncourt <franck.mail at dthconnex.com>
+
+---
+ t/tcpip.t     |   34 ++++++++++++++++++++--------------
+ t/tcpip2ssl.t |    1 +
+ 2 files changed, 21 insertions(+), 14 deletions(-)
+
+diff --git a/t/tcpip.t b/t/tcpip.t
+index 9d52680..93081f0 100644
+--- a/t/tcpip.t
++++ b/t/tcpip.t
+@@ -1,22 +1,28 @@
+ use lib "t/lib";
+ use Test::More tests=>4;
+ 
+-BEGIN{ use_ok("XML::Stream","Node"); }
+ 
+-my $stream = new XML::Stream(style=>"node");
+-ok( defined($stream), "new()" );
+-isa_ok( $stream, "XML::Stream" );
++SKIP: {
+ 
+-SKIP:
+-{
+-    my $sock = IO::Socket::INET->new(PeerAddr=>'jabber.org:5222');
+-    skip "Cannot open connection (maybe a firewall?)",1 unless defined($sock);
++    skip "No network communication allowed", 3 if ($ENV{NO_NETWORK});
++
++    BEGIN{ use_ok("XML::Stream","Node"); }
++
++    my $stream = new XML::Stream(style=>"node");
++    ok( defined($stream), "new()" );
++    isa_ok( $stream, "XML::Stream" );
++
++    SKIP:
++    {
++        my $sock = IO::Socket::INET->new(PeerAddr=>'jabber.org:5222');
++        skip "Cannot open connection (maybe a firewall?)",1 unless defined($sock);
+     
+-    my $status = $stream->Connect(hostname=>"jabber.org",
+-                                  port=>5222,
+-                                  namespace=>"jabber:client",
+-                                  connectiontype=>"tcpip",
+-                                  timeout=>10);
+-    ok( defined($status), "Made connection");
++        my $status = $stream->Connect(hostname=>"jabber.org",
++                                      port=>5222,
++                                      namespace=>"jabber:client",
++                                      connectiontype=>"tcpip",
++                                      timeout=>10);
++        ok( defined($status), "Made connection");
++    }
+ }
+ 
+diff --git a/t/tcpip2ssl.t b/t/tcpip2ssl.t
+index 43d4b22..8c5ff06 100644
+--- a/t/tcpip2ssl.t
++++ b/t/tcpip2ssl.t
+@@ -6,6 +6,7 @@ SKIP:
+ {
+     eval("use IO::Socket::SSL 0.81;");
+     skip "IO::Socket::SSL not installed", 2 if $@;
++    skip "No network communication allowed", 2 if ($ENV{NO_NETWORK});
+ 
+     BEGIN{ use_ok( "XML::Stream","Tree", "Node" ); }
+ 
+-- 
+tg: (67812e7..) t/upstream/tests (depends on: master)

Added: trunk/libxml-stream-perl/debian/patches/t_upstream_tests.diff
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-stream-perl/debian/patches/t_upstream_tests.diff?rev=52661&op=file
==============================================================================
--- trunk/libxml-stream-perl/debian/patches/t_upstream_tests.diff (added)
+++ trunk/libxml-stream-perl/debian/patches/t_upstream_tests.diff Fri Feb 12 23:49:00 2010
@@ -1,0 +1,75 @@
+From: Franck Joncourt <franck at debian.org>
+Origin: vendor
+Forwarded: no
+Subject: Disable tests which require a network access.
+ We disable tests which require network communication. This way we avoid
+ FTBFS due to services not available.
+
+Signed-off-by: Franck Joncourt <franck at debian.org>
+
+---
+ t/tcpip.t     |   34 ++++++++++++++++++++--------------
+ t/tcpip2ssl.t |    1 +
+ 2 files changed, 21 insertions(+), 14 deletions(-)
+
+diff --git a/t/tcpip.t b/t/tcpip.t
+index 9d52680..93081f0 100644
+--- a/t/tcpip.t
++++ b/t/tcpip.t
+@@ -1,22 +1,28 @@
+ use lib "t/lib";
+ use Test::More tests=>4;
+ 
+-BEGIN{ use_ok("XML::Stream","Node"); }
+ 
+-my $stream = new XML::Stream(style=>"node");
+-ok( defined($stream), "new()" );
+-isa_ok( $stream, "XML::Stream" );
++SKIP: {
+ 
+-SKIP:
+-{
+-    my $sock = IO::Socket::INET->new(PeerAddr=>'jabber.org:5222');
+-    skip "Cannot open connection (maybe a firewall?)",1 unless defined($sock);
++    skip "No network communication allowed", 3 if ($ENV{NO_NETWORK});
++
++    BEGIN{ use_ok("XML::Stream","Node"); }
++
++    my $stream = new XML::Stream(style=>"node");
++    ok( defined($stream), "new()" );
++    isa_ok( $stream, "XML::Stream" );
++
++    SKIP:
++    {
++        my $sock = IO::Socket::INET->new(PeerAddr=>'jabber.org:5222');
++        skip "Cannot open connection (maybe a firewall?)",1 unless defined($sock);
+     
+-    my $status = $stream->Connect(hostname=>"jabber.org",
+-                                  port=>5222,
+-                                  namespace=>"jabber:client",
+-                                  connectiontype=>"tcpip",
+-                                  timeout=>10);
+-    ok( defined($status), "Made connection");
++        my $status = $stream->Connect(hostname=>"jabber.org",
++                                      port=>5222,
++                                      namespace=>"jabber:client",
++                                      connectiontype=>"tcpip",
++                                      timeout=>10);
++        ok( defined($status), "Made connection");
++    }
+ }
+ 
+diff --git a/t/tcpip2ssl.t b/t/tcpip2ssl.t
+index 43d4b22..8c5ff06 100644
+--- a/t/tcpip2ssl.t
++++ b/t/tcpip2ssl.t
+@@ -6,6 +6,7 @@ SKIP:
+ {
+     eval("use IO::Socket::SSL 0.81;");
+     skip "IO::Socket::SSL not installed", 2 if $@;
++    skip "No network communication allowed", 2 if ($ENV{NO_NETWORK});
+ 
+     BEGIN{ use_ok( "XML::Stream","Tree", "Node" ); }
+ 
+-- 
+tg: (67812e7..) t/upstream/tests (depends on: master)

Modified: trunk/libxml-stream-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-stream-perl/debian/rules?rev=52661&op=diff
==============================================================================
--- trunk/libxml-stream-perl/debian/rules (original)
+++ trunk/libxml-stream-perl/debian/rules Fri Feb 12 23:49:00 2010
@@ -4,5 +4,5 @@
 
 override_dh_auto_test:
 	[ ! -d t/lib ] || mv t/lib t/lib-do-not-use
-	dh_auto_test
+	NO_NETWORK=1 dh_auto_test
 	[ ! -d t/lib-do-not-use ] || mv t/lib-do-not-use t/lib




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