[Lsb-messages] /var/www/bzr/lsb/4.0/perl-test r81: Backport bug 3554 fixes from devel

Stew Benedict stewb at linux-foundation.org
Thu May 24 16:54:52 UTC 2012


------------------------------------------------------------
revno: 81
committer: Stew Benedict <stewb at linux-foundation.org>
branch nick: perl-test
timestamp: Thu 2012-05-24 12:54:52 -0400
message:
  Backport bug 3554 fixes from devel
added:
  scripts/package/perl-test-bug-3554.patch
modified:
  scripts/package/lsb-test-perl.spec
-------------- next part --------------
=== modified file 'scripts/package/lsb-test-perl.spec'
--- a/scripts/package/lsb-test-perl.spec	2012-03-20 19:37:01 +0000
+++ b/scripts/package/lsb-test-perl.spec	2012-05-24 16:54:52 +0000
@@ -47,6 +47,7 @@
 Patch31: perl-test-bug-3424.patch
 Patch32: perl-test-bug-3450.patch
 Patch33: perl-test-bug-3466.patch
+Patch34: perl-test-bug-3554.patch
 
 URL: http://bzr.linuxfoundation.org/loggerhead/lsb/devel/perl-test/files
 BuildRoot: %{_tmppath}/%{name}-root
@@ -112,6 +113,8 @@
 patch -p0 -b -z .system-perl < %{PATCH6}
 patch -p1 -b -z .1888 < %{PATCH3}
 patch -p1 -b -z .2114 < %{PATCH4}
+# try to capture more info on the subtest fails
+patch -p2 -b -z .3554 < %{PATCH34}
 cd -
 
 # bug 2507
@@ -719,7 +722,7 @@
 done
 
 # clean up the patch backup files
-for extension in system-perl tet-output tet-output10 set-euid 1888 2114 2147 2507 2605 2613 1889 2644 2705 2820 2840 2845 2848 2953 3043 3066 3128 3148 3152 5.8.9 3154 3161 3113 3249 3266 3424 3450 3466;do
+for extension in system-perl tet-output tet-output10 set-euid 1888 2114 2147 2507 2605 2613 1889 2644 2705 2820 2840 2845 2848 2953 3043 3066 3128 3148 3152 5.8.9 3154 3161 3113 3249 3266 3424 3450 3466 3554;do
   find . -name "*.$extension" | xargs rm -f
 done
 popd
@@ -797,6 +800,9 @@
 
 #==================================================
 %changelog
+* Fri May 18 2012 Stew Benedict <stewb at linux-foundation.org>
+- Try to capture the name of subtests that fail in the journal (bug 3554, P34)
+
 * Tue Mar 20 2012 Stew Benedict <stewb at linux-foundation.org>
 - disable Carp tests that fail against 1.25 (bug 3466, P33)
 

=== added file 'scripts/package/perl-test-bug-3554.patch'
--- a/scripts/package/perl-test-bug-3554.patch	1970-01-01 00:00:00 +0000
+++ b/scripts/package/perl-test-bug-3554.patch	2012-05-24 16:54:52 +0000
@@ -0,0 +1,32 @@
+--- ./perl-5.10.0/t/Harness.pm.bug-3554	2012-05-18 14:54:28.537221382 -0400
++++ ./perl-5.10.0/t/Harness.pm	2012-05-18 14:55:31.040221410 -0400
+@@ -394,6 +394,10 @@ sub execute_tests {
+         # state of the current test.
+         my @failed = grep { !$results->details->[$_-1]{ok} }
+                      1..@{$results->details};
++        my @fnames;
++        foreach (@failed) {
++            push(@fnames, "test " . $_ . " '" . $results->details->[$_-1]{name} . "' failed");
++        }
+         my @todo_pass = grep { $results->details->[$_-1]{actual_ok} &&
+                                $results->details->[$_-1]{type} eq 'todo' }
+                         1..@{$results->details};
+@@ -410,6 +414,7 @@ sub execute_tests {
+             skip_reason => $results->skip_reason,
+             skip_all    => $Strap->{skip_all},
+             ml          => $ml,
++            fname 	=> \@fnames,
+         );
+ 
+         $tot{bonus}       += $results->bonus;
+@@ -802,6 +807,10 @@ sub _dubious_return {
+             (my $txt, $canon) = _canondetail($test->{max},$test->{skipped},'Failed',@{$test->{failed}});
+             print "DIED. ",$txt;
+             # LSB journal needs a FAIL here too
++            # iterate the numbers/names of any subtests that failed
++            foreach (@{$test->{fname}}) {
++                tet::test_info($tot->{files}, $_);
++            }
+             tet::test_info($tot->{files}, $txt);
+             tet::test_result($tot->{files}, "FAIL");
+         }



More information about the lsb-messages mailing list