commit 520c9060015390df5712c702113212a2b8ffce58
Author: Ralf Corsépius <[email protected]>
Date: Mon Apr 11 17:44:33 2011 +0200
Add Test-WWW-Mechanize-1.30-svn.r712.diff (Fix FTBS on f13/f14/f15).
Add Test-WWW-Mechanize-1.30-Test-LongString.diff (Fix FTBS on f16).
Spec file cleanup.
Test-WWW-Mechanize-1.30-Test-LongString.diff | 48 +++++++++++++++++++
Test-WWW-Mechanize-1.30-svn-trunk-r712.diff | 63 ++++++++++++++++++++++++++
perl-Test-WWW-Mechanize.spec | 26 +++++++----
3 files changed, 127 insertions(+), 10 deletions(-)
---
diff --git a/Test-WWW-Mechanize-1.30-Test-LongString.diff
b/Test-WWW-Mechanize-1.30-Test-LongString.diff
new file mode 100644
index 0000000..105d4d6
--- /dev/null
+++ b/Test-WWW-Mechanize-1.30-Test-LongString.diff
@@ -0,0 +1,48 @@
+diff -u -x .svn trunk/t/back_ok.t trunk.hacked/t/back_ok.t
+--- trunk/t/back_ok.t 2011-04-11 17:09:03.414516193 +0200
++++ trunk.hacked/t/back_ok.t 2011-04-11 17:17:53.538464020 +0200
+@@ -54,7 +54,7 @@
+ test_out( 'not ok 1 - Try to get bad URL' );
+ test_fail( +3 );
+ test_diag( '500' );
+- test_diag( q{Can't connect to wango.nonexistent.xx-only-testing:80 (Bad
hostname 'wango.nonexistent.xx-only-testing')} );
++ test_diag( q{Can't connect to wango.nonexistent.xx-only-testing:80 (Bad
hostname)} );
+ my $ok = $mech->get_ok( $badurl, 'Try to get bad URL' );
+ test_test( 'Fails to get nonexistent URI and reports failure' );
+
+diff -u -x .svn trunk/t/content_lacks.t trunk.hacked/t/content_lacks.t
+--- trunk/t/content_lacks.t 2011-04-11 17:09:03.413516183 +0200
++++ trunk.hacked/t/content_lacks.t 2011-04-11 17:17:53.538464020 +0200
+@@ -35,7 +35,7 @@
+ test_fail(+4);
+ test_diag(q( searched: "<html>\x{0a} <head>\x{0a} <title>Test
Page</title>"...) );
+ test_diag(q( and found: "Test Page") );
+-test_diag(q( at position: 33) );
++test_diag(q( at position: 33 (line 3 column 16)) );
+ $mech->content_lacks( 'Test Page', q{Shouldn't say it's a test page} );
+ test_test( 'Handles not finding it' );
+
+diff -u -x .svn trunk/t/get_ok.t trunk.hacked/t/get_ok.t
+--- trunk/t/get_ok.t 2011-04-11 17:09:03.414516193 +0200
++++ trunk.hacked/t/get_ok.t 2011-04-11 17:17:53.538464020 +0200
+@@ -55,7 +55,7 @@
+ test_out( 'not ok 1 - Try to get bad URL' );
+ test_fail( +3 );
+ test_diag( '500' );
+- test_diag( q{Can't connect to wango.nonexistent.xx-only-testing:80 (Bad
hostname 'wango.nonexistent.xx-only-testing')} );
++ test_diag( q{Can't connect to wango.nonexistent.xx-only-testing:80 (Bad
hostname)} );
+ my $ok = $mech->get_ok( $badurl, 'Try to get bad URL' );
+ test_test( 'Fails to get nonexistent URI and reports failure' );
+
+diff -u -x .svn trunk/t/head_ok.t trunk.hacked/t/head_ok.t
+--- trunk/t/head_ok.t 2011-04-11 17:09:03.414516193 +0200
++++ trunk.hacked/t/head_ok.t 2011-04-11 17:17:53.538464020 +0200
+@@ -52,7 +52,7 @@
+ test_out( 'not ok 1 - Try to HEAD bad URL' );
+ test_fail( +3 );
+ test_diag( '500' );
+- test_diag( qq{Can't connect to $NONEXISTENT:80 (Bad hostname
'$NONEXISTENT')} );
++ test_diag( qq{Can't connect to $NONEXISTENT:80 (Bad hostname)} );
+ my $ok = $mech->head_ok( $badurl, 'Try to HEAD bad URL' );
+ test_test( 'Fails to HEAD nonexistent URI and reports failure' );
+
diff --git a/Test-WWW-Mechanize-1.30-svn-trunk-r712.diff
b/Test-WWW-Mechanize-1.30-svn-trunk-r712.diff
new file mode 100644
index 0000000..e933da0
--- /dev/null
+++ b/Test-WWW-Mechanize-1.30-svn-trunk-r712.diff
@@ -0,0 +1,63 @@
+--- Test-WWW-Mechanize-1.30.orig/t/head_ok.t 2008-12-22 22:28:21.000000000
+0100
++++ trunk/t/head_ok.t 2011-04-11 17:09:03.414516193 +0200
+@@ -2,21 +2,12 @@
+
+ use strict;
+ use warnings;
+-use Test::More;
++use Test::More tests => 11;
+ use Test::Builder::Tester;
+
+-use constant NONEXISTENT => 'http://blahblablah.xx-nonexistent.';
+-BEGIN {
+- if ( gethostbyname( NONEXISTENT ) ) {
+- plan skip_all => 'Found an A record for the non-existent domain';
+- }
+-}
+-
+-BEGIN {
+- plan tests => 11;
+- use_ok( 'Test::WWW::Mechanize' );
+-}
++my $NONEXISTENT = 'blahblablah.xx-nonexistent.foo';
+
++require_ok( 'Test::WWW::Mechanize' );
+
+ use lib 't';
+ use TestServer;
+@@ -25,7 +16,7 @@
+ my $pid = $server->background;
+ my $server_root = $server->root;
+
+-my $mech=Test::WWW::Mechanize->new( autocheck => 0 );
++my $mech = Test::WWW::Mechanize->new( autocheck => 0 );
+ isa_ok($mech,'Test::WWW::Mechanize');
+
+ GOOD_HEAD: { # Stop giggling, you!
+@@ -46,15 +37,22 @@
+ test_test('HEAD existing URI and reports success - default desc');
+ }
+
+-BAD_HEAD: {
+- my $badurl = 'http://wango.nonexistent.xx-only-testing/';
++# Bad HEAD test. Relies on getting an error finding a non-existent domain.
++# Some ISPs "helpfully" provide resolution for non-existent domains,
++# and thus this test fails by succeeding. We check for this annoying
++# behavior and skip this subtest if we get it.
++SKIP: {
++ skip "Found an A record for the non-existent domain $NONEXISTENT", 4
++ if gethostbyname $NONEXISTENT;
++
++ my $badurl = "http://$NONEXISTENT/";
+ $mech->head($badurl);
+- ok(!$mech->success, q{sanity check: we can't load NONEXISTENT.html} );
++ ok(!$mech->success, q{sanity check: we can't load $badurl} );
+
+ test_out( 'not ok 1 - Try to HEAD bad URL' );
+ test_fail( +3 );
+ test_diag( '500' );
+- test_diag( q{Can't connect to wango.nonexistent.xx-only-testing:80 (Bad
hostname 'wango.nonexistent.xx-only-testing')} );
++ test_diag( qq{Can't connect to $NONEXISTENT:80 (Bad hostname
'$NONEXISTENT')} );
+ my $ok = $mech->head_ok( $badurl, 'Try to HEAD bad URL' );
+ test_test( 'Fails to HEAD nonexistent URI and reports failure' );
+
diff --git a/perl-Test-WWW-Mechanize.spec b/perl-Test-WWW-Mechanize.spec
index aa003c6..6d86cf6 100644
--- a/perl-Test-WWW-Mechanize.spec
+++ b/perl-Test-WWW-Mechanize.spec
@@ -1,13 +1,19 @@
Name: perl-Test-WWW-Mechanize
Version: 1.30
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Testing-specific WWW::Mechanize subclass
Group: Development/Libraries
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/Test-WWW-Mechanize/
Source0:
http://www.cpan.org/authors/id/P/PE/PETDANCE/Test-WWW-Mechanize-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+# Testsuite fixes from upstream's svn trunk:
+Patch0: Test-WWW-Mechanize-1.30-svn-trunk-r712.diff
+
+# Test::LongString > 0.15 has changed behavior, causing testsuite failure
+# c.f. http://code.google.com/p/www-mechanize/issues/detail?id=197#c1
+Patch1: Test-WWW-Mechanize-1.30-Test-LongString.diff
BuildArch: noarch
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo
$version))
@@ -19,7 +25,7 @@ BuildRequires: perl(HTML::Lint)
BuildRequires: perl(HTML::TreeBuilder)
BuildRequires: perl(HTTP::Server::Simple) >= 0.07
BuildRequires: perl(Test::Builder::Tester) >= 1.09
-BuildRequires: perl(Test::LongString) >= 0.12
+BuildRequires: perl(Test::LongString) >= 0.15
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::Pod) >= 0.08
BuildRequires: perl(Test::Pod::Coverage) >= 1.00
@@ -33,14 +39,14 @@ features for web application testing.
%prep
%setup -q -n Test-WWW-Mechanize-%{version}
-
+%patch0 -p1
+%patch1 -p1
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
-rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
@@ -50,11 +56,6 @@ find $RPM_BUILD_ROOT -depth -type d -exec rmdir {}
2>/dev/null ';'
%check
make test
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
%files
%defattr(-,root,root,-)
%doc Changes README
@@ -63,6 +64,11 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Apr 11 2011 Ralf Corsépius <[email protected]> - 1.30-3
+- Add Test-WWW-Mechanize-1.30-svn.r712.diff (Fix FTBS on f13/f14/f15).
+- Add Test-WWW-Mechanize-1.30-Test-LongString.diff (Fix FTBS on f16).
+- Spec file cleanup.
+
* Wed Feb 09 2011 Fedora Release Engineering <[email protected]>
- 1.30-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/perl-devel