summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Fredric <kentnl@gentoo.org>2017-11-29 19:33:12 +1300
committerKent Fredric <kentnl@gentoo.org>2017-11-29 19:33:58 +1300
commit201c42c9b3d80d3d7916b37444fbc5cb27cf8776 (patch)
treec67482b8e832e97eb70d9b0f3ae36cab055b2c06 /dev-perl/Net-XMPP/files
parentx11-misc/menulibre: Old. (diff)
downloadgentoo-201c42c9b3d80d3d7916b37444fbc5cb27cf8776.tar.gz
gentoo-201c42c9b3d80d3d7916b37444fbc5cb27cf8776.tar.bz2
gentoo-201c42c9b3d80d3d7916b37444fbc5cb27cf8776.zip
dev-perl/Net-XMPP: Fix tests re bug #623002 and bug #612256
- Fix test failures without '.' in @INC (#623002) - Update network-test patch to skip another network test (#612256) - Simplify patching logic - use DIST_EXAMPLES feature for examples Bug: https://bugs.gentoo.org/623002 Bug: https://bugs.gentoo.org/612256 Package-Manager: Portage-2.3.14, Repoman-2.3.6
Diffstat (limited to 'dev-perl/Net-XMPP/files')
-rw-r--r--dev-perl/Net-XMPP/files/1.05-no-dot-inc.patch133
-rw-r--r--dev-perl/Net-XMPP/files/1.05-no-network-tests.patch53
2 files changed, 178 insertions, 8 deletions
diff --git a/dev-perl/Net-XMPP/files/1.05-no-dot-inc.patch b/dev-perl/Net-XMPP/files/1.05-no-dot-inc.patch
new file mode 100644
index 000000000000..773b9f014b6f
--- /dev/null
+++ b/dev-perl/Net-XMPP/files/1.05-no-dot-inc.patch
@@ -0,0 +1,133 @@
+From bad1310f14223c12c1d8933ef5de17fd323374f5 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Wed, 29 Nov 2017 19:07:38 +1300
+Subject: Fix tests failing under Perl 5.26 w/ PERL_USE_UNSAFE_INC=0
+
+ require t/foo.pl
+
+Used to work as a result of the assumed '.' at the end of `@INC`.
+This is no longer true under Perl 5.26 without PERL_USE_UNSAFE_INC=1
+in your environment (which gets defaulted on under CPAN installers and
+under Test::Harness if not explicitly disabled, and will be hard-off
+in Perl 5.30)
+
+Bug: https://bugs.gentoo.org/623002
+Bug: https://github.com/dap/Net-XMPP/pull/16
+---
+ t/iq.t | 2 +-
+ t/jid.t | 2 +-
+ t/message.t | 2 +-
+ t/packet_iqauth.t | 2 +-
+ t/packet_iqroster.t | 2 +-
+ t/presence.t | 2 +-
+ t/rawxml.t | 2 +-
+ t/roster.t | 2 +-
+ 8 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/t/iq.t b/t/iq.t
+index 9174e6d..1742d6c 100644
+--- a/t/iq.t
++++ b/t/iq.t
+@@ -3,7 +3,7 @@ use Test::More tests=>115;
+
+ BEGIN{ use_ok( "Net::XMPP" ); }
+
+-require "t/mytestlib.pl";
++require "./t/mytestlib.pl";
+
+ my $debug = Net::XMPP::Debug->new(setdefault=>1,
+ level=>-1,
+diff --git a/t/jid.t b/t/jid.t
+index dc07440..fa426a4 100644
+--- a/t/jid.t
++++ b/t/jid.t
+@@ -3,7 +3,7 @@ use Test::More tests=>15;
+
+ BEGIN{ use_ok( "Net::XMPP" ); }
+
+-require "t/mytestlib.pl";
++require "./t/mytestlib.pl";
+
+ my $jid = Net::XMPP::JID->new('host.com/xxx@yyy.com/zzz');
+ ok( defined($jid), "new()" );
+diff --git a/t/message.t b/t/message.t
+index 70bcef8..7c2f554 100644
+--- a/t/message.t
++++ b/t/message.t
+@@ -3,7 +3,7 @@ use Test::More tests=>136;
+
+ BEGIN{ use_ok( "Net::XMPP" ); }
+
+-require "t/mytestlib.pl";
++require "./t/mytestlib.pl";
+
+ my $debug = Net::XMPP::Debug->new(setdefault=>1,
+ level=>-1,
+diff --git a/t/packet_iqauth.t b/t/packet_iqauth.t
+index 748917b..f80b5ae 100644
+--- a/t/packet_iqauth.t
++++ b/t/packet_iqauth.t
+@@ -3,7 +3,7 @@ use Test::More tests=>55;
+
+ BEGIN{ use_ok( "Net::XMPP" ); }
+
+-require "t/mytestlib.pl";
++require "./t/mytestlib.pl";
+
+ my $debug = Net::XMPP::Debug->new(setdefault=>1,
+ level=>-1,
+diff --git a/t/packet_iqroster.t b/t/packet_iqroster.t
+index 706e5f0..4bd48e8 100644
+--- a/t/packet_iqroster.t
++++ b/t/packet_iqroster.t
+@@ -3,7 +3,7 @@ use Test::More tests=>57;
+
+ BEGIN{ use_ok( "Net::XMPP" ); }
+
+-require "t/mytestlib.pl";
++require "./t/mytestlib.pl";
+
+ my $debug = Net::XMPP::Debug->new(setdefault=>1,
+ level=>-1,
+diff --git a/t/presence.t b/t/presence.t
+index ce6980d..14f9516 100644
+--- a/t/presence.t
++++ b/t/presence.t
+@@ -3,7 +3,7 @@ use Test::More tests=>132;
+
+ BEGIN{ use_ok( "Net::XMPP" ); }
+
+-require "t/mytestlib.pl";
++require "./t/mytestlib.pl";
+
+ my $debug = Net::XMPP::Debug->new(setdefault=>1,
+ level=>-1,
+diff --git a/t/rawxml.t b/t/rawxml.t
+index b4f091b..43b6380 100644
+--- a/t/rawxml.t
++++ b/t/rawxml.t
+@@ -3,7 +3,7 @@ use Test::More tests=>54;
+
+ BEGIN{ use_ok( "Net::XMPP" ); }
+
+-require "t/mytestlib.pl";
++require "./t/mytestlib.pl";
+
+ my $message = Net::XMPP::Message->new();
+ ok( defined($message), "new()");
+diff --git a/t/roster.t b/t/roster.t
+index 19ed87b..a365d2e 100644
+--- a/t/roster.t
++++ b/t/roster.t
+@@ -11,7 +11,7 @@ BEGIN {
+ }
+ BEGIN{ use_ok( "Net::XMPP" ); }
+
+-require "t/mytestlib.pl";
++require "./t/mytestlib.pl";
+
+ my $debug = Net::XMPP::Debug->new(setdefault=>1,
+ level=>-1,
+--
+2.14.3
+
diff --git a/dev-perl/Net-XMPP/files/1.05-no-network-tests.patch b/dev-perl/Net-XMPP/files/1.05-no-network-tests.patch
index 921121805def..e20b39316b94 100644
--- a/dev-perl/Net-XMPP/files/1.05-no-network-tests.patch
+++ b/dev-perl/Net-XMPP/files/1.05-no-network-tests.patch
@@ -1,7 +1,20 @@
-diff -Naur Net-XMPP-1.05/t/gtalk.t Net-XMPP-1.05b/t/gtalk.t
---- Net-XMPP-1.05/t/gtalk.t 2014-12-22 21:28:51.000000000 +0000
-+++ Net-XMPP-1.05b/t/gtalk.t 2016-03-06 07:14:13.313580716 +0000
-@@ -2,7 +2,12 @@
+From ce5bd091758174c06e0b250040d85b1cc1c8bad0 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Sun, 6 Mar 2016 20:35:45 +1300
+Subject: Disable network tests when tests forcibly required by ENV
+
+Bug: https://bugs.gentoo.org/612256
+---
+ t/gtalk.t | 7 ++++++-
+ t/lib/Net/XMPP/Test/Utils.pm | 1 +
+ t/roster.t | 10 +++++++++-
+ 3 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/t/gtalk.t b/t/gtalk.t
+index 747b7df..3b1af73 100644
+--- a/t/gtalk.t
++++ b/t/gtalk.t
+@@ -2,7 +2,12 @@ use strict;
use warnings;
use Test::More;
@@ -15,10 +28,11 @@ diff -Naur Net-XMPP-1.05/t/gtalk.t Net-XMPP-1.05b/t/gtalk.t
######################## XML::Stream mocking starts
#{
# package XML::Stream;
-diff -Naur Net-XMPP-1.05/t/lib/Net/XMPP/Test/Utils.pm Net-XMPP-1.05b/t/lib/Net/XMPP/Test/Utils.pm
---- Net-XMPP-1.05/t/lib/Net/XMPP/Test/Utils.pm 2014-12-22 21:28:51.000000000 +0000
-+++ Net-XMPP-1.05b/t/lib/Net/XMPP/Test/Utils.pm 2016-03-06 06:59:57.227261659 +0000
-@@ -23,6 +23,7 @@
+diff --git a/t/lib/Net/XMPP/Test/Utils.pm b/t/lib/Net/XMPP/Test/Utils.pm
+index d69eca3..3c4565e 100644
+--- a/t/lib/Net/XMPP/Test/Utils.pm
++++ b/t/lib/Net/XMPP/Test/Utils.pm
+@@ -23,6 +23,7 @@ sub can_run_tests {
}
sub conn_is_available {
@@ -26,3 +40,26 @@ diff -Naur Net-XMPP-1.05/t/lib/Net/XMPP/Test/Utils.pm Net-XMPP-1.05b/t/lib/Net/X
return online();
}
+diff --git a/t/roster.t b/t/roster.t
+index 25ee505..19ed87b 100644
+--- a/t/roster.t
++++ b/t/roster.t
+@@ -1,6 +1,14 @@
+ use lib "t/lib";
+-use Test::More tests=>75;
+
++BEGIN {
++ require Test::More;
++ if ($ENV{NO_NETWORK_TESTING}) {
++ Test::More->import(skip_all => "NO_NETWORK_TESTS set");
++ }
++ else {
++ Test::More->import( tests => 75 );
++ }
++}
+ BEGIN{ use_ok( "Net::XMPP" ); }
+
+ require "t/mytestlib.pl";
+--
+2.14.3
+