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

alexm-guest pushed a commit to branch master
in repository libnet-dns-lite-perl.

commit 4ecb307b043ad230dbb7688970ee54df46bf15b0
Author: Alex Muntada <al...@alexm.org>
Date:   Sun Dec 11 21:45:26 2016 +0100

    Skip network tests
    
    Gbp-Dch: Ignore
---
 debian/changelog                      | 25 +------------
 debian/patches/no-network-tests.patch | 67 +++++++++++++++++++++++++++++++++++
 debian/patches/series                 |  1 +
 debian/rules                          |  3 ++
 debian/upstream/metadata              |  4 ++-
 5 files changed, 75 insertions(+), 25 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index c515ce3..33fc4ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,27 +1,4 @@
-libnet-dns-lite-perl (0.12-1) UNRELEASED; urgency=low
-
-  TODO:
-  - the packages FTBFS quite spectacularly in a chroot without network access
-    (as required by debian policy), most tests explode as they try to contact
-    google or whatever else:
-
-      Test Summary Report
-      -------------------
-      t/00base.t       (Wstat: 512 Tests: 5 Failed: 2)
-        Failed tests:  3-4
-        Non-zero exit status: 2
-      t/01no_response.t (Wstat: 2816 Tests: 0 Failed: 0)
-        Non-zero exit status: 11
-        Parse errors: No plan found in TAP output
-      t/02inet_aton.t  (Wstat: 512 Tests: 3 Failed: 2)
-        Failed tests:  1-2
-        Non-zero exit status: 2
-      t/05mx.t         (Wstat: 256 Tests: 2 Failed: 1)
-        Failed test:  2
-        Non-zero exit status: 1
-      Files=6, Tests=15,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.22 cusr  
0.01 csys =  0.26 CPU)
-      Result: FAIL
-
+libnet-dns-lite-perl (0.12-1) unstable; urgency=low
 
   * Initial Release. (Closes: #847516)
 
diff --git a/debian/patches/no-network-tests.patch 
b/debian/patches/no-network-tests.patch
new file mode 100644
index 0000000..1548369
--- /dev/null
+++ b/debian/patches/no-network-tests.patch
@@ -0,0 +1,67 @@
+Description: Skip tests that require network access if not available
+Author: Alex Muntada <al...@alexm.org>
+Forwarded: https://github.com/kazuho/p5-Net-DNS-Lite/pull/6
+Bug: https://github.com/kazuho/p5-Net-DNS-Lite/pull/6
+
+--- a/t/00base.t
++++ b/t/00base.t
+@@ -4,6 +4,9 @@
+ use Test::More;
+ 
+ BEGIN {
++    plan skip_all => 'These tests need network access'
++        if $ENV{NO_NETWORK_TESTING};
++
+     use_ok('Net::DNS::Lite');
+ };
+ 
+--- a/t/02inet_aton.t
++++ b/t/02inet_aton.t
+@@ -7,6 +7,9 @@
+ use Time::HiRes qw(time);
+ 
+ BEGIN {
++    plan skip_all => 'These tests need network access'
++        if $ENV{NO_NETWORK_TESTING};
++
+     if (! -e '/etc/resolv.conf') {
+         plan skip_all => 'no /etc/resolv.conf';
+     }
+--- a/t/03cache.t
++++ b/t/03cache.t
+@@ -6,6 +6,9 @@
+ use Test::Requires qw(Cache::LRU);
+ 
+ BEGIN {
++    plan skip_all => 'These tests need network access'
++        if $ENV{NO_NETWORK_TESTING};
++
+     use_ok('Net::DNS::Lite');
+ };
+ 
+--- a/t/05mx.t
++++ b/t/05mx.t
+@@ -4,6 +4,9 @@
+ use Test::More;
+ 
+ BEGIN {
++    plan skip_all => 'These tests need network access'
++        if $ENV{NO_NETWORK_TESTING};
++
+     use_ok('Net::DNS::Lite');
+ };
+ 
+--- a/t/01no_response.t
++++ b/t/01no_response.t
+@@ -6,6 +6,11 @@
+ use Test::More;
+ use Time::HiRes qw(time);
+ 
++BEGIN {
++    plan skip_all => 'These tests need network access'
++        if $ENV{NO_NETWORK_TESTING};
++}
++
+ my $r = Net::DNS::Lite->new(
+     server => [ qw(google.com) ], # google.com just drops UDP 53 (no response)
+ );
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..4677d0e
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+no-network-tests.patch
diff --git a/debian/rules b/debian/rules
index 2d33f6a..daf8c42 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,3 +2,6 @@
 
 %:
        dh $@
+
+override_dh_auto_test:
+       NO_NETWORK_TESTING=1 dh_auto_test
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
index 60fee8f..578030e 100644
--- a/debian/upstream/metadata
+++ b/debian/upstream/metadata
@@ -2,4 +2,6 @@
 Archive: CPAN
 Contact: Kazuho Oku
 Name: Net-DNS-Lite
-Repository: https://github.com/kazuho/p5-Net-DNS-Lite
+Repository: https://github.com/kazuho/p5-Net-DNS-Lite.git
+Repository-Browse: https://github.com/kazuho/p5-Net-DNS-Lite
+Bug-Database: https://github.com/kazuho/p5-Net-DNS-Lite/issues

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libnet-dns-lite-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