Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 992734 - perl-Test-Class: FTBFS in rawhide
Summary: perl-Test-Class: FTBFS in rawhide
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Test-Class
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/schwern/test-more/...
Whiteboard:
Depends On:
Blocks: F20FTBFS 992485 992578 992709
TreeView+ depends on / blocked
 
Reported: 2013-08-05 06:15 UTC by Dennis Gilmore
Modified: 2013-08-09 08:40 UTC (History)
4 users (show)

Fixed In Version: perl-Test-Class-0.39-3.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-09 08:40:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Fix up to 0.98_04 (2.65 KB, patch)
2013-08-07 13:49 UTC, Petr Pisar
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
CPAN 85004 0 None None None Never

Description Dennis Gilmore 2013-08-05 06:15:14 UTC
Your package perl-Test-Class failed to build from source in current rawhide.

http://koji.fedoraproject.org/koji/taskinfo?taskID=5742683

Build logs:
root.log: http://kojipkgs.fedoraproject.org/work/tasks/2683/5742683/root.log
build.log: http://kojipkgs.fedoraproject.org/work/tasks/2683/5742683/build.log
state.log: http://kojipkgs.fedoraproject.org/work/tasks/2683/5742683/state.log
NOTE: build logs are cleaned up after 1 week

For details on mass rebuild see https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

Comment 1 Petr Pisar 2013-08-06 13:31:37 UTC
Tests are not compatible with Test-Simple 0.98_05.

Comment 2 Ralf Corsepius 2013-08-07 05:40:40 UTC
(In reply to Petr Pisar from comment #1)
> Tests are not compatible with Test-Simple 0.98_05.

According to CPAN Test-Simple 0.98_05 is a developer release. Looking at the timestamps, I would not want to exclude it's a stalled development release.

Q: Any particular reason for using this version instead of the "official stable" version (0.98)? IMO, it's worth considering downgrading to 0.98, but I am sure about it.

Comment 3 Petr Pisar 2013-08-07 08:40:09 UTC
Test-Simple 0.98_05 fixes another bugs that appeared in the early rebuild stage, thus I upgraded to the this development version intentionally.

Comment 4 Petr Pisar 2013-08-07 08:45:25 UTC
This looks like a different wording introduced in 0.98_04. I have already adapted other packages due this change. I will try it here too.

Comment 5 Petr Pisar 2013-08-07 13:49:14 UTC
Created attachment 783932 [details]
Fix up to 0.98_04

This patch fixes Test-Class test failures due to changes in Test-Simple up to 0.98_04.

Comment 6 Petr Pisar 2013-08-07 13:52:33 UTC
There are mysterious failure with Test-Simple 0.98_05. They are caused with this Test-Simple commit:

commit 1d69410753cf233807ef9526b75d74afbddf92d8
Author: nnutter <iam>
Date:   Thu Apr 4 22:27:28 2013 -0500

    fix bug when test_fail is called via a do statement

    test_fail used $0 as the filename instead of the filename reported by
    caller. Under normal execution these would be the same but if the test
    is executed by a do block then these would no longer be the same.

diff --git a/lib/Test/Builder/Tester.pm b/lib/Test/Builder/Tester.pm
index f84e630..d9ac9e7 100644
--- a/lib/Test/Builder/Tester.pm
+++ b/lib/Test/Builder/Tester.pm
@@ -222,7 +222,7 @@ sub test_fail {
     $line = $line + ( shift() || 0 );    # prevent warnings

     # expect that on stderr
-    $err->expect("#     Failed test ($0 at line $line)");
+    $err->expect("#     Failed test ($filename at line $line)");
 }

 =item test_diag

They happen when Test-Class test calls test_err(qr//):

[test@fedora-20 test-class]$ perl -I/tmp/Test-Simple-0.98_05/lib/ -T -Ilib t/runtests_return.t
1..2
ok 1 - early return handled (skip)
not ok 2 - early return handled (fail)
#   Failed test 'early return handled (fail)'
#   at t/runtests_return.t line 42.
# STDERR is:
# #   Failed test '(Bar::darwin_only returned before plan complete)'
# #   at lib/Test/Class.pm line 392.
# #   (in Bar->darwin_only)
# #   Failed test '(Bar::darwin_only returned before plan complete)'
# #   at lib/Test/Class.pm line 392.
# #   (in Bar->darwin_only)
# 
# not:
# (?^s:.*in Bar->darwin_only.*)
# 
# as expected

But I don't understand why that fails because it nowhere checks the file name.

Comment 7 Petr Pisar 2013-08-07 14:03:44 UTC
Hm, no. It's caused by this Test-Simple commit:



commit 497965306444982d4948e24811e44e72619885f8
Author: Michael G. Schwern <schwern>
Date:   Mon Apr 15 17:13:43 2013 +0100

    Fix Test::Builder::Tester so it works with subtests.
    
    They already work in TB1.5 and this wasn't hard to fix.
    
    For #350

diff --git a/lib/Test/Builder/Tester.pm b/lib/Test/Builder/Tester.pm
index 573c818..2c49cf4 100644
--- a/lib/Test/Builder/Tester.pm
+++ b/lib/Test/Builder/Tester.pm
@@ -98,15 +98,13 @@ my $err = tie *$error_handle,  "Test::Builder::Tester::Tie",
 # for remembering that we're testing and where we're testing at
 my $testing = 0;
 my $testing_num;
+my $original_is_passing;
 
 # remembering where the file handles were originally connected
 my $original_output_handle;
 my $original_failure_handle;
 my $original_todo_handle;
 
-my $original_test_number;
-my $original_harness_state;
-
 my $original_harness_env;
 
 # function that starts testing and redirects the filehandles for now
@@ -134,6 +132,8 @@ sub _start_testing {
     $testing     = 1;
     $testing_num = $t->current_test;
     $t->current_test(0);
+    $original_is_passing  = $t->is_passing;
+    $t->is_passing(1);
 
     # look, we shouldn't do the ending stuff
     $t->no_ending(1);
@@ -329,6 +329,7 @@ sub test_test {
     # restore the test no, etc, back to the original point
     $t->current_test($testing_num);
     $testing = 0;
+    $t->is_passing($original_is_passing);
 
     # re-enable the original setting of the harness
     $ENV{HARNESS_ACTIVE} = $original_harness_env;
@@ -469,11 +470,19 @@ sub expect {
 
     my @checks = @_;
     foreach my $check (@checks) {
+        $check = $self->_account_for_subtest($check);
         $check = $self->_translate_Failed_check($check);
         push @{ $self->{wanted} }, ref $check ? $check : "$check\n";
     }
 }
 
+sub _account_for_subtest {
+    my( $self, $check ) = @_;
+
+    # Since we ship with Test::Builder, calling a private method is safe...ish.
+    return $t->_indent . $check;
+}
+
 sub _translate_Failed_check {
     my( $self, $check ) = @_;

Comment 8 Petr Pisar 2013-08-09 07:47:13 UTC
Fixed perl-Test-Simple is being built now. I will push and build fixed perl-Test-Class in turn.


Note You need to log in before you can comment on or make changes to this bug.