theory / tap-parser-sourcehandler-pgtap

TAP::Parser::SourceHandler::pgTAP
http://search.cpan.org/dist/TAP::Parser::SourceHandler::pgTAP
11 stars 13 forks source link

Diagnostic and comment lines are not displayed if --jobs is greater than 1 #39

Closed W1M0R closed 1 year ago

W1M0R commented 1 year ago

Example 1

An example that works as expected (without specifying the --jobs parameter):

pg_prove -U postgres --dbname test --recurse --ext .sql --trap ./tests/
./tests/01.sql ....... 1/2
# Failed test 2: "There should be 17 disabled resources"
#         have: 17
#         want: 18
# Looks like you failed 1 test of 2
./tests/01.sql ....... Failed 1/2 subtests

./tests/02.sql .. ok
./tests/03.sql .... ok
./tests/04.sql ............. ok
./tests/05.sql ............. ok

Test Summary Report
-------------------
./tests/01.sql     (Wstat: 0 Tests: 2 Failed: 1)
  Failed test:  2
Files=5, Tests=9,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.02 cusr  0.00 csys =  0.05 CPU)
Result: FAIL

Example 2

The same command but with --jobs 2, no longer produces the comment/diagnostic line:

pg_prove -U postgres --dbname test --recurse --ext .sql --trap --jobs 2 ./tests/
./tests/01.sql ....... Failed 1/2 subtests

./tests/02.sql .. ok
./tests/03.sql .... ok
./tests/04.sql ............. ok
./tests/05.sql ............. ok

Test Summary Report
-------------------
./tests/01.sql     (Wstat: 0 Tests: 2 Failed: 1)
  Failed test:  2
Files=5, Tests=9,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.01 cusr  0.02 csys =  0.06 CPU)
Result: FAIL

I expected the following comment lines to appear in the output:

# Failed test 2: "There should be 17 disabled resources"
#         have: 17
#         want: 18
# Looks like you failed 1 test of 2
theory commented 1 year ago

Looks like this is an issue with Test::Harness. See Perl-Toolchain-Gang/Test-Harness#101.