[Lsb-messages] /var/www/bzr/lsb/devel/perl-test r96: Try to capture subtest names for failures (bug 3554)

Stew Benedict stewb at linux-foundation.org
Fri May 18 19:18:43 UTC 2012


------------------------------------------------------------
revno: 96
committer: Stew Benedict <stewb at linux-foundation.org>
branch nick: perl-test
timestamp: Fri 2012-05-18 15:18:43 -0400
message:
  Try to capture subtest names for failures (bug 3554)
added:
  scripts/package/perl-test-bug-3554.patch
modified:
  scripts/package/Makefile
  scripts/package/lsb-test-perl.spec.sed
-------------- next part --------------
=== modified file 'scripts/package/Makefile'
--- a/scripts/package/Makefile	2012-03-20 19:32:09 +0000
+++ b/scripts/package/Makefile	2012-05-18 19:18:43 +0000
@@ -1,8 +1,8 @@
 # XXX We should play the usual tricks defining stuff here and building
 # XXX a specfile from this info, but not yet: for now keep in sync
 PACKAGE=lsb-test-perl
-VERSION=4.1.4
-RELEASE=5
+VERSION=4.1.5
+RELEASE=1
 PERLVER8=5.8.8
 PERLVER10=5.10.0
 PERLURL=http://www.cpan.org/src/5.0/

=== modified file 'scripts/package/lsb-test-perl.spec.sed'
--- a/scripts/package/lsb-test-perl.spec.sed	2012-03-20 19:32:09 +0000
+++ b/scripts/package/lsb-test-perl.spec.sed	2012-05-18 19:18:43 +0000
@@ -52,6 +52,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
@@ -117,6 +118,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
@@ -724,7 +727,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
@@ -802,6 +805,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-18 19:18:43 +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