Perl-Toolchain-Gang / Test-Harness

Run Perl standard test scripts with statistics
http://testanything.org/
29 stars 65 forks source link

prove t/*.t does not respect $ENV{HARNESS_VERBOSE} #85

Open shlomif opened 5 years ago

shlomif commented 5 years ago
shlomif[black-hole]:~/Test-Harness$ export HARNESS_VERBOSE=1
shlomif[black-hole]:~/Test-Harness$ prove t/*.t
t/000-load.t ........... 13/97 # Testing Test::Harness 3.42, Perl 5.028001, /usr/bin/perl5.28.1
t/000-load.t ........... ok     
t/aggregator.t ......... ok     
t/bailout.t ............ ok     
t/base.t ............... ok     
t/callbacks.t .......... ok     
t/console.t ............ ok   
t/env_opts.t ........... ok     
t/errors.t ............. ok     
t/file.t ............... 1/56 ^C
shlomif[black-hole]:~/Test-Harness$ runprove t/*.t 2>&1 | head -10
t/000-load ........... 1..97
ok 1 - use TAP::Parser;
ok 2 - ... and TAP::Parser should have the correct version
ok 3 - use App::Prove;
ok 4 - ... and App::Prove should have the correct version
ok 5 - use App::Prove::State;
ok 6 - ... and App::Prove::State should have the correct version
ok 7 - use App::Prove::State::Result;
ok 8 - ... and App::Prove::State::Result should have the correct version
ok 9 - use App::Prove::State::Result::Test;
shlomif[black-hole]:~/Test-Harness$ 

I just wasted many minutes trying to understand why it doesn;t work on travis.

jkeenan commented 5 years ago
$ man prove | ack -i verbose
        -v,  --verbose         Print all test lines.
             --count           Show the X/Y test count when not verbose
             --normalize       Normalize TAP output in verbose output

The documentation for prove says nothing about $ENV{HARNESS_VERBOSE}. So I wouldn't expect that envvar to have any impact on prove notwithstanding the fact that it is discussed elsewhere in the Test-Harness CPAN distribution.

Leont commented 5 years ago

Yeah, this sort of divergence between prove and Test::Harness is rather unfortunate.