[libbot-basicbot-pluggable-perl] 04/06: Do not run tests that needs internet access to avoid FTBFS on buildd systems
Jotam Jr. Trejo
jotamjr-guest at alioth.debian.org
Tue Oct 29 18:20:39 UTC 2013
This is an automated email from the git hooks/post-receive script.
jotamjr-guest pushed a commit to branch master
in repository libbot-basicbot-pluggable-perl.
commit 068fad604974f6f8cd5403916e18b6b4d51ccfa1
Author: Jotam Jr. Trejo <jotamjr at debian.org.sv>
Date: Tue Oct 29 11:40:29 2013 -0600
Do not run tests that needs internet access to avoid FTBFS on buildd systems
---
debian/changelog | 24 +-----------------------
debian/patches/no_internet.patch | 37 +++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 5 +++++
4 files changed, 44 insertions(+), 23 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index d8702af..7eba033 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,29 +3,7 @@ libbot-basicbot-pluggable-perl (0.98-1) UNRELEASED; urgency=low
TODO:
- d/copyright: incomplete. some files have different years, and at least one
file has a different copyright holder
- - FTBFS for me (probably because it tries to talk to external servers)
- Loading Title from Bot/BasicBot/Pluggable/Module/Title.pm at /tmp/buildd/libbot-basicbot-pluggable-perl-0.98/blib/lib/Bot/BasicBot/Pluggable.pm line 106.
-
- # Failed test 'got title of google ok'
- # at t/06title.t line 12.
- # ''
- # doesn't match '(?^:Google)'
- Loading Infobot from Bot/BasicBot/Pluggable/Module/Infobot.pm at /tmp/buildd/libbot-basicbot-pluggable-perl-0.98/blib/lib/Bot/BasicBot/Pluggable.pm line 106.
-
- # Failed test 'got title of google ok'
- # at t/06title.t line 18.
- # 'Okay.'
- # doesn't match '(?^:Google)'
- # Looks like you failed 2 tests of 6.
- t/06title.t ...............
- Dubious, test returned 2 (wstat 512, 0x200)
- Failed 2/6 subtests
-
- - lintian:
- E: libbot-basicbot-pluggable-perl changes: changed-by-address-malformed Jotam Jr. Trejo <jotamjr at quasar>
- E: libbot-basicbot-pluggable-perl: debian-changelog-file-contains-invalid-email-address jotamjr at quasar
-
* Initial Release. (Closes: #695946)
- -- Jotam Jr. Trejo <jotamjr at quasar> Mon, 28 Oct 2013 00:29:50 -0600
+ -- Jotam Jr. Trejo <jotamjr at debian.org.sv> Mon, 28 Oct 2013 00:29:50 -0600
diff --git a/debian/patches/no_internet.patch b/debian/patches/no_internet.patch
new file mode 100644
index 0000000..11040a3
--- /dev/null
+++ b/debian/patches/no_internet.patch
@@ -0,0 +1,37 @@
+Description: Workaround to skip tests when internet access is not available
+ Due to Debian policy, build systems of Debiandon't have internet access,
+ that causes that the internet dependent tests fail at build time.
+Forwarded: not-needed
+Author: Jotam Jr. Trejo <jotamjr at debian.org.sv>
+Last-Update: 2013-10-29
+--- a/t/06title.t
++++ b/t/06title.t
+@@ -9,14 +9,27 @@
+ my $title = $bot->load("Title");
+ ok( $title, "loaded Title module" );
+
++SKIP: {
++
++skip "Debian build systems do not have internet access", 1 unless $ENV{CONNECTED_TO_NET};
++
+ like( $bot->tell_direct("http://google.com"),
+ qr/Google/, "got title of google ok" );
+
++}
++
+ # test to make sure that Title.pm isn't eating urls.
+ ok( $bot->load("Infobot"), "loaded Infobot module" );
+-my $t = $bot->tell_direct("google is at http://google.com");
++
++SKIP: {
++
++skip "Debian build systems do not have internet access", 2 unless $ENV{CONNECTED_TO_NET};
++
++my $t = $bot->tell_direct("google is at http:/google.com");
+ like( $t, qr/Google/, "got title of google ok" );
+ like( $t, qr/Okay/, "infobot still there" );
+
++}
++
+ $title->set( 'user_ignore_re' => 'perl' );
+ is( $bot->tell_direct("http://use.perl.org"), '', 'ignore_re works' );
diff --git a/debian/patches/series b/debian/patches/series
index 4f31582..f97a07a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
+no_internet.patch
fix_manpage_errors_from_pod2man.patch
fix_pod_misspells.patch
diff --git a/debian/rules b/debian/rules
index 27c6d30..fd03ddf 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,11 @@ TMP = $(CURDIR)/debian/$(PACKAGE)
%:
dh $@
+override_dh_auto_test:
+ #Since debian build systems do not have internet accessuse, we need to avoid all the tests that needs it
+ #use CONNECTED_TO_NET=1 when the build host does have internet access.
+ CONNECTED_TO_NET=0 dh_auto_test
+
override_dh_auto_install:
dh_auto_install
rm $(TMP)/usr/bin/bot-basicbot-pluggable-cgi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libbot-basicbot-pluggable-perl.git
More information about the Pkg-perl-cvs-commits
mailing list