[perl-Test-AutoLoader] Make tests compatible with perl 5.16
Petr Pisar
ppisar at fedoraproject.org
Thu Jun 21 09:08:17 UTC 2012
commit eb4a2a9b74b2fd7843864e14153c835c5b9e7d3b
Author: Petr Písař <ppisar at redhat.com>
Date: Thu Jun 21 10:54:35 2012 +0200
Make tests compatible with perl 5.16
...ader-0.03-Skip-POSIX-tests-with-perl-5.16.patch | 48 ++++++++++++++++++++
perl-Test-AutoLoader.spec | 4 ++
2 files changed, 52 insertions(+), 0 deletions(-)
---
diff --git a/Test-AutoLoader-0.03-Skip-POSIX-tests-with-perl-5.16.patch b/Test-AutoLoader-0.03-Skip-POSIX-tests-with-perl-5.16.patch
new file mode 100644
index 0000000..0f16074
--- /dev/null
+++ b/Test-AutoLoader-0.03-Skip-POSIX-tests-with-perl-5.16.patch
@@ -0,0 +1,48 @@
+From 7f347d684936c6108e658ba6c12e43b7e62562f3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Thu, 21 Jun 2012 10:49:01 +0200
+Subject: [PATCH] Skip POSIX tests with perl 5.16
+
+---
+ t/00basic.t | 11 +++++++++--
+ 1 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/t/00basic.t b/t/00basic.t
+index 94f1a4f..462d8e0 100644
+--- a/t/00basic.t
++++ b/t/00basic.t
+@@ -35,6 +35,7 @@ require EmptyModule;
+ my @unreadable = (File::Spec->catdir(qw(tlib auto TestBusted1)),
+ File::Spec->catfile(qw(tlib auto TestBusted2 no_ready.al)));
+ my $CAN_CHMOD = chmod 0000, @unreadable;
++my $POSIX_USES_AUTOLOAD = $^V lt v5.16.0;
+ my $file_errors;
+ $file_errors .=<<DIAG if $CAN_CHMOD;
+ couldn't load no_ready.al: Permission denied
+@@ -46,8 +47,6 @@ DIAG
+
+
+ my @tests = (
+- [ ['POSIX'],{ok=>1,name=>"Autoload of POSIX (all files)"},"Standard-distribution module, all files"],
+- [ [qw(POSIX strcpy)],{ok=>1,name=>"Autoload of POSIX (listed subroutines)"},"Standard-distribution module, one file"],
+ [ [qw(POSIX no_such_function)], {ok=>0,diag=>" couldn't load no_such_function.al: No such file or directory"}, "Standard-distribution, bad subroutine name"],
+ [ [qw(strict)], {ok=>0,diag=>"Unable to find valid autoload directory for strict"}, "Non-existent auto directory"],
+ [ [qw(EmptyModule)], {ok=>0,diag=>"No autoloaded files found"}, "No files in auto directory"],
+@@ -59,6 +58,14 @@ my @tests = (
+
+ );
+
++if ($POSIX_USES_AUTOLOAD) {
++ push @tests,
++ [ ['POSIX'],{ok=>1,name=>"Autoload of POSIX (all files)"},"Standard-distribution module, all files"],
++ [ [qw(POSIX strcpy)],{ok=>1,name=>"Autoload of POSIX (listed subroutines)"},"Standard-distribution module, one file"];
++} else {
++ SKIP:{skip "POSIX module does not use AutoLoader",12}
++}
++
+ if ($CAN_CHMOD) {
+ push @tests,
+ [ [qw(TestBusted1)], {ok=>0,diag=>"Unable to find valid autoload directory for TestBusted1"}, "Unreadable auto directory"],
+--
+1.7.7.6
+
diff --git a/perl-Test-AutoLoader.spec b/perl-Test-AutoLoader.spec
index f8d5de6..7363afe 100644
--- a/perl-Test-AutoLoader.spec
+++ b/perl-Test-AutoLoader.spec
@@ -8,6 +8,8 @@ URL: http://search.cpan.org/dist/Test-AutoLoader/
Source0: http://www.cpan.org/authors/id/B/BW/BWARFIELD/NRGN/Test-AutoLoader-%{version}.tar.gz
# Fix test plan number (RT#66399)
Patch0: Test-AutoLoader-0.03-Fix-test-plan-number.patch
+# Perl 5.16 does not autosplit POSIX module (RT#77942)
+Patch1: Test-AutoLoader-0.03-Skip-POSIX-tests-with-perl-5.16.patch
BuildArch: noarch
BuildRequires: perl(ExtUtils::MakeMaker)
# Run-time:
@@ -33,6 +35,7 @@ embarrassing typos.
%prep
%setup -q -n Test-AutoLoader-%{version}
%patch0 -p1
+%patch1 -p1
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
@@ -56,6 +59,7 @@ LC_ALL=C make test
%changelog
* Tue Jun 12 2012 Petr Pisar <ppisar at redhat.com> - 0.03-2
- Perl 5.16 rebuild
+- Make tests compatible with perl 5.16 (RT#77942)
* Thu Apr 26 2012 Petr Pisar <ppisar at redhat.com> 0.03-1
- Specfile autogenerated by cpanspec 1.78.
More information about the scm-commits
mailing list