rpms/perl/F-13 perl-5.10.1-IO-isolate_tests.patch, NONE, 1.1 perl.spec, 1.261, 1.262

Petr Pisar ppisar at fedoraproject.org
Tue Jul 27 13:43:50 UTC 2010


Author: ppisar

Update of /cvs/pkgs/rpms/perl/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv9612

Modified Files:
	perl.spec 
Added Files:
	perl-5.10.1-IO-isolate_tests.patch 
Log Message:
Run tests in C locale and in parallel

perl-5.10.1-IO-isolate_tests.patch:
 io_dir.t |    7 +++++++
 1 file changed, 7 insertions(+)

--- NEW FILE perl-5.10.1-IO-isolate_tests.patch ---
As perl5101delta documents, ext/IO/t/io_dir.t breaks parallel testing.

Problem is the test operates on common directory that is touched by other
tests. Because io_dir compares directory content with previous state,
concurently running tests break assumption about non-volatility of the
directory.

This patch fixes the problem by moving io_dir tests into private directory.

http://rt.perl.org/rt3/Ticket/Display.html?id=76740

diff -Naur perl-5.10.1.orig/ext/IO/t/io_dir.t perl-5.10.1/ext/IO/t/io_dir.t
--- perl-5.10.1.orig/ext/IO/t/io_dir.t	2009-06-23 22:02:03.000000000 +0200
+++ perl-5.10.1/ext/IO/t/io_dir.t	2010-07-26 18:00:28.186773222 +0200
@@ -20,6 +20,13 @@
 
 use strict;
 
+# Prepare standalone directory to avoid influence of other parallel tests
+# mangling CWD content.
+my $new_dir = "io_dir_test";
+mkdir "$new_dir" unless -d "$new_dir";
+mkdir "$new_dir/subdir" unless -d "$new_dir/subdir";
+chdir "$new_dir" or die "Could not change directory to $new_dir: $!";
+
 my $DIR = $^O eq 'MacOS' ? ":" : ".";
 
 my $CLASS = "IO::Dir";


Index: perl.spec
===================================================================
RCS file: /cvs/pkgs/rpms/perl/F-13/perl.spec,v
retrieving revision 1.261
retrieving revision 1.262
diff -u -p -r1.261 -r1.262
--- perl.spec	23 Jul 2010 12:12:24 -0000	1.261
+++ perl.spec	27 Jul 2010 13:43:49 -0000	1.262
@@ -4,10 +4,11 @@
 %define perl_archname %{_arch}-%{_os}%{perl_arch_stem}
 
 %define multilib_64_archs x86_64 s390x ppc64 sparc64
+%define parallel_tests 1
 
 Name:           perl
 Version:        %{perl_version}
-Release:        116%{?dist}
+Release:        117%{?dist}
 Epoch:          %{perl_epoch}
 Summary:        Practical Extraction and Report Language
 Group:          Development/Languages
@@ -78,6 +79,9 @@ Patch13:        perl-5.10.1-CVE_2009_362
 # http://rt.perl.org/rt3//Public/Bug/Display.html?id=73814
 Patch14:        perl-5.10.1-unpack-didn-t-handle-scalar-context.patch
 
+# Fix IO tests to allow parallel testing
+Patch15:        perl-5.10.1-IO-isolate_tests.patch
+
 # Version macros for some of the modules.
 # If comment starts with module name, distributed module is part of
 # perl bundle. Otherwise it belongs to module version macro
@@ -909,6 +913,7 @@ upstream tarball from perl.org.
 %patch12 -p1
 %patch13 -p1
 %patch14 -p1
+%patch15 -p1
 
 %patch101 -p1
 %patch102 -p1
@@ -1133,6 +1138,7 @@ pushd %{build_archlib}/CORE/
 	'Fedora Patch12: backward compatibility for the trasition' \
     'Fedora Patch13: CVE_2009_3626' \
     'Fedora Patch14: unpack RT 73814' \
+    'Fedora Patch15: enable parallel tests of IO module' \
 	'Fedora Patch101: Update ExtUtils::CBuilder to %{ExtUtils_CBuilder_version}' \
 	'Fedora Patch102: Update File::Path to %{File_Path_version}' \
 	'Fedora Patch103: Update Module::Build to %{Module_Build_version}' \
@@ -1160,7 +1166,12 @@ rm -rf $RPM_BUILD_ROOT
 # ext/threads-shared/t/stress......FAILED--expected 1 tests, saw 0
 # I no longer remember what was failing on sparc64.
 %ifnarch ppc64 s390x sparc64
-make test
+%if %{parallel_tests}
+    JOBS=$(printf '%%s' "%{?_smp_mflags}" | sed 's/.*-j\([0-9][0-9]*\).*/\1/')
+    LC_ALL=C TEST_JOBS=$JOBS make test_harness
+%else
+    LC_ALL=C make test
+%endif
 %endif
 
 %post libs -p /sbin/ldconfig
@@ -1796,6 +1807,11 @@ make test
 
 # Old changelog entries are preserved in CVS.
 %changelog
+* Mon Jul 26 2010 Petr Pisar <ppisar at redhat.com> - 4:5.10.1-117
+- Enable parallel testing in IO module
+- Run tests in C locale to pass t/op/stat.t test in localized environment
+- Run tests in parallel
+
 * Fri Jul 23 2010  Marcela Mašláňová <mmaslano at redhat.com> - 4:5.10.1-116
 - 575842 remove -DPERL_USE_SAFE_PUTENV from Configure. All related bugs were
  tested with perl compiled without this option.



More information about the scm-commits mailing list