r14966 - in /trunk/libpoe-perl/debian: changelog patches/honour_networking_flag_in_tests.patch patches/series rules

tincho-guest at users.alioth.debian.org tincho-guest at users.alioth.debian.org
Fri Feb 15 06:58:28 UTC 2008


Author: tincho-guest
Date: Fri Feb 15 06:58:26 2008
New Revision: 14966

URL: http://svn.debian.org/wsvn/?sc=1&rev=14966
Log:
  - remove libgtk-perl from Suggests. Shall we remove Gtk.pm entirely?
* debian/rules: from scratch. Do loopback test before enabling network
  tests.
* debian/patches/honour_networking_flag_in_tests.patch: patch to avoid FTBFS
  if networking is not present at all (CPAN#33276).

Added:
    trunk/libpoe-perl/debian/patches/honour_networking_flag_in_tests.patch
Modified:
    trunk/libpoe-perl/debian/changelog
    trunk/libpoe-perl/debian/patches/series
    trunk/libpoe-perl/debian/rules

Modified: trunk/libpoe-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libpoe-perl/debian/changelog?rev=14966&op=diff
==============================================================================
--- trunk/libpoe-perl/debian/changelog (original)
+++ trunk/libpoe-perl/debian/changelog Fri Feb 15 06:58:26 2008
@@ -1,8 +1,4 @@
-libpoe-perl (2:0.9999-1) UNRELEASED; urgency=low
-
-  TODO: shall we remove Gtk.pm entirely?
-  TODO: is it OK to run the networking tests? On my machine (Tincho), with
-  only the loopback interface, they run OK.
+libpoe-perl (2:0.9999-1) unstable; urgency=low
 
   * New upstream release (Closes: #465548).
   * Incorporating changes from NMU, thanks Pierre Habouzit (no need to close
@@ -14,7 +10,7 @@
     - separate correctly build-depends from b-d-i.
     - drop version from perl dependency (too old).
     - bump Standards-Version (no changes).
-    - remove libgtk-perl from Suggests.
+    - remove libgtk-perl from Suggests. Shall we remove Gtk.pm entirely?
     - remove perl-tk build-dep, as it enables checks that require X.
     - add libgtk-perl and perl-tk to build-conflicts, to avoid possible FTBFS.
     - debhelper compat to 5.
@@ -22,10 +18,13 @@
     - add netbase to build-dep, to enable network tests (against localhost).
     - add Homepage and Vcs-*.
   * debian/: remove dirs and examples (was wrong anyway), moved to rules.
-  * debian/rules: from scratch.
+  * debian/rules: from scratch. Do loopback test before enabling network
+    tests.
   * debian/copyright: add lots of missing CP info.
-
- -- Martín Ferrari <martin.ferrari at gmail.com>  Wed, 13 Feb 2008 06:08:33 -0200
+  * debian/patches/honour_networking_flag_in_tests.patch: patch to avoid FTBFS
+    if networking is not present at all (CPAN#33276).
+
+ -- Martín Ferrari <martin.ferrari at gmail.com>  Fri, 15 Feb 2008 04:58:13 -0200
 
 libpoe-perl (2:0.9989-1.1) unstable; urgency=medium
 

Added: trunk/libpoe-perl/debian/patches/honour_networking_flag_in_tests.patch
URL: http://svn.debian.org/wsvn/trunk/libpoe-perl/debian/patches/honour_networking_flag_in_tests.patch?rev=14966&op=file
==============================================================================
--- trunk/libpoe-perl/debian/patches/honour_networking_flag_in_tests.patch (added)
+++ trunk/libpoe-perl/debian/patches/honour_networking_flag_in_tests.patch Fri Feb 15 06:58:26 2008
@@ -1,0 +1,78 @@
+Index: libpoe-perl/t/10_units/02_pipes/02_oneway.t
+===================================================================
+--- libpoe-perl.orig/t/10_units/02_pipes/02_oneway.t
++++ libpoe-perl/t/10_units/02_pipes/02_oneway.t
+@@ -36,6 +36,10 @@ SKIP: {
+ 
+ ### Test one-way pair of inet sockets.
+ SKIP: {
++  unless (-f "run_network_tests") {
++    skip "Network access (and permission) required to run inet test.", 1;
++  }
++
+   my ($uni_read, $uni_write) = POE::Pipe::OneWay->new('inet');
+   skip "$^O does not support one-way inet sockets.", 1
+     unless defined $uni_read and defined $uni_write;
+Index: libpoe-perl/t/10_units/02_pipes/03_twoway.t
+===================================================================
+--- libpoe-perl.orig/t/10_units/02_pipes/03_twoway.t
++++ libpoe-perl/t/10_units/02_pipes/03_twoway.t
+@@ -53,6 +53,10 @@ SKIP: {
+ 
+ ### Test two-way inet sockets.
+ SKIP: {
++  unless (-f "run_network_tests") {
++    skip "Network access (and permission) required to run inet test.", 2;
++  }
++
+   my ($a_rd, $a_wr, $b_rd, $b_wr) = POE::Pipe::TwoWay->new('inet');
+ 
+   skip "$^O does not support two-way inet pipes", 2
+Index: libpoe-perl/t/20_resources/00_base/filehandles.pm
+===================================================================
+--- libpoe-perl.orig/t/20_resources/00_base/filehandles.pm
++++ libpoe-perl/t/20_resources/00_base/filehandles.pm
+@@ -31,7 +31,12 @@ sub SH_HANDLE    () { POE::Kernel::SH_HA
+ sub SH_REFCOUNT  () { POE::Kernel::SH_REFCOUNT  }
+ sub SH_MODECOUNT () { POE::Kernel::SH_MODECOUNT }
+ 
+-use Test::More tests => 192;
++use Test::More;
++
++unless (-f "run_network_tests") {
++  plan skip_all => "Network access (and permission) required to run this test";
++}
++plan tests => 192;
+ 
+ ### Factoried out common tests
+ 
+Index: libpoe-perl/t/90_regression/cfedde-filter-httpd.t
+===================================================================
+--- libpoe-perl.orig/t/90_regression/cfedde-filter-httpd.t
++++ libpoe-perl/t/90_regression/cfedde-filter-httpd.t
+@@ -6,6 +6,10 @@ use warnings;
+ use strict;
+ 
+ BEGIN {
++  unless (-f 'run_network_tests') {
++    print "1..0 # skip - Network access (and permission) required to run this test\n";
++    exit;
++  }
+   eval "use HTTP::Request";
+   if ($@) {
+     print "1..0 # skip - HTTP::Request needed to test POE::Filter::HTTPD\n";
+Index: libpoe-perl/t/90_regression/immute-server-tcp-filter.t
+===================================================================
+--- libpoe-perl.orig/t/90_regression/immute-server-tcp-filter.t
++++ libpoe-perl/t/90_regression/immute-server-tcp-filter.t
+@@ -6,6 +6,10 @@ use strict;
+ use warnings;
+ 
+ BEGIN {
++  unless (-f 'run_network_tests') {
++    print "1..0 # skip - Network access (and permission) required to run this test\n";
++    exit;
++  }
+   eval "use HTTP::Request";
+   if ($@) {
+     print "1..0 # skip - HTTP::Request needed to test POE::Filter::HTTPD\n";

Modified: trunk/libpoe-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/trunk/libpoe-perl/debian/patches/series?rev=14966&op=diff
==============================================================================
--- trunk/libpoe-perl/debian/patches/series (original)
+++ trunk/libpoe-perl/debian/patches/series Fri Feb 15 06:58:26 2008
@@ -1,1 +1,2 @@
 makefile_dont_use_defaults.patch
+honour_networking_flag_in_tests.patch

Modified: trunk/libpoe-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libpoe-perl/debian/rules?rev=14966&op=diff
==============================================================================
--- trunk/libpoe-perl/debian/rules (original)
+++ trunk/libpoe-perl/debian/rules Fri Feb 15 06:58:26 2008
@@ -12,10 +12,11 @@
 build: build-stamp
 build-stamp: $(QUILT_STAMPFN)
 	dh_testdir
-	echo 'n' | $(PERL) Makefile.PL INSTALLDIRS=vendor 
+	# Run tests only if localhost is reachable, the perl snippet prints
+	# "n" when reachable.
+	perl -MNet::Ping -e 'print (Net::Ping->new()->ping("127.0.0.1", 1) ? \
+		"n" : "y", "\n");' | $(PERL) Makefile.PL INSTALLDIRS=vendor 
 	$(MAKE)
-	#chmod +x debian/xvfb-run
-	#debian/xvfb-run $(MAKE) test
 	$(MAKE) test
 	touch $@
 
@@ -23,6 +24,8 @@
 	dh_testdir
 	dh_testroot
 	dh_clean build-stamp install-stamp
+	# Needed because after unpatching Makefile.PL is newer than Makefile
+	[ ! -f Makefile ] || touch Makefile
 	[ ! -f Makefile ] || $(MAKE) realclean
 
 install: install-stamp




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