perl-Log-Dispatch-2.41-1.fc21 fails to build in F21 due to test plan for t/01-basic.t: t/01-basic.t (Wstat: 0 Tests: 344 Failed: 167) Failed tests: 11-177 Parse errors: Plan (1..177) must be at the beginning or end of the TAP output Tests out of sequence. Found (11) but expected (178) Tests out of sequence. Found (12) but expected (179) Tests out of sequence. Found (13) but expected (180) Tests out of sequence. Found (14) but expected (181) Displayed the first 5 of 170 TAP syntax errors. The problem is: $ LOG_DISPATCH_TEST_EMAIL="root" prove -l -v t/01-basic.t t/01-basic.t .. ok 1 - created Log::Dispatch object ok 2 - First line in log file set to level 'emerg' is 'emerg level 1' ok 3 - Second line in log file set to level 'emerg' is 'emerg level 2' ok 4 - First line in log file set to level 'debug' is 'info level 2' ok 5 - Second line in log file set to level 'debug' is 'emerg level 2' ok 6 - second LD object used syswrite ok 7 - First line in log file with a max level of 'crit' is 'critical' ok 8 - Log::Dispatch::Handle created log file should contain 'handle test\n' # Sending email with Mail::Send to root. # If you get it then the test succeeded (PID 3444) No real MTA found, using 'testfile' at /usr/share/perl5/vendor_perl/Mail/Mailer.pm line 108. ok 9 - sent email via MailSend # Sending email with Mail::Sendmail to root. # If you get it then the test succeeded (PID 3444) Error sending mail: connect to localhost failed (Connection refused) connect to localhost failed connect to localhost failed (Connection refused) no (more) retries! ok 10 - sent email via MailSendmail # Sending email with MIME::Lite to root. # If you get it then the test succeeded (PID 3444) ok 11 - sent mail via MIMELite [...] ok 177 - code received the expected messages 1..177 ok 11 - sent mail via MIMELite [...] ok 177 - code received the expected messages 1..177 Something echoes the output since test 11 twice which break TAP.
It's because emitting TAP messages after undefining Log::Dispatch object. E.g. here: # Log::Dispatch::Email::MIMELite SKIP: { skip "Cannot do MIMELite tests", 1 unless $tests{MIMELite} && $TestConfig{email_address}; my $dispatch = Log::Dispatch->new; $dispatch->add( Log::Dispatch::Email::MIMELite->new( name => 'Mime::Lite', min_level => 'debug', to => $TestConfig{email_address}, subject => 'Log::Dispatch test suite' ) ); $dispatch->log( level => 'emerg', message => "MIME::Lite - If you can read this then the test succeeded (PID $$)" ); diag( "Sending email with MIME::Lite to $TestConfig{email_address}.\nIf you get it then the test succeeded (PID $$)\n" ); undef $dispatch; ok( 1, 'sent mail via MIMELite' ); } The 'sent mail via MIMELite', the first doubled TAP message, gets doubled because it is invoked after undef $dispatch.
This package failure blocks tens of other packages (perl-Log-Log4Perl, perl-Catalyst, rt3).
I don't know why, but if /usr/sbin/sendmail is available the test pass. The requires e-mail modules do not require /usr/sbin/sendmail because they allow local /usr/sbin/sendmail or SMTP, both optional. I will add /usr/sbin/sendmail into build-requires on the executable to this package.