Skip Menu |

This queue is for tickets about the Test-Harness CPAN distribution.

Report information
The Basics
Id: 17210
Status: resolved
Priority: 0/
Queue: Test-Harness

People
Owner: andy [...] hexten.net
Requestors: adamk [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.56
Fixed in: (no value)



Subject: prove -b and prove -l should set PERL5LIB
When prove -b and -l include the path, they don't add it to PERL5LIB as well, unlike make test, which DOES set PERL5LIB. As a result, when in prove, if you call perl again via system (or IPC::Run3 or what have you) in make test the -b equivalent is propogated to the child process, whereas in prove it is not. This can result in the wrong versions of modules being loaded by the child process. prove should set PERL5LIB to match the behaviour of make test. See below a debugging dump from some testing, showing different behaviours. ----------------------------------------------------------- eadam@red:~/pita/trunk/PITA$ make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/01_compile.t t/02_support_server.t t/03_guest.t t/04_guest_image.t t/01_compile...........ok t/02_support_server....ok t/03_guest.............ok t/04_guest_image.......NOK 69 # Failed test 'Got the pidfile for the support server' # in t/04_guest_image.t at line 201. t/04_guest_image.......NOK 70 # Failed test 'Support server started at the right time' # in t/04_guest_image.t at line 203. # CVSROOT: :pserver:adam@red.phase-n.com:/var/lib/cvs # HARNESS_ACTIVE: 1 # HARNESS_VERSION: 2.56 # HOME: /home/adam # LANG: en_US # LANGUAGE: en_US:en_GB:en # LOGNAME: adam # MAIL: /var/mail/adam # MAKEFLAGS: # MAKELEVEL: 1 # MFLAGS: # PATH: /home/adam/CPAN/tools/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games # PERL5LIB: /home/adam/pita/trunk/PITA/inc:/home/adam/pita/trunk/PITA/blib/lib:/home/adam/pita/trunk/PITA/blib/arch # PERL_DL_NONLAZY: 1 # PWD: /home/adam/pita/trunk/PITA # SHELL: /bin/sh # SHLVL: 2 # SSH_CLIENT: ::ffff:202.90.48.125 2695 22 # SSH_CONNECTION: ::ffff:202.90.48.125 2695 ::ffff:202.90.48.198 22 # SSH_TTY: /dev/pts/0 # TERM: xterm # TEST_VERBOSE: 0 # USER: adam # _: /usr/bin/perl # Looks like you failed 2 tests of 71. t/04_guest_image.......dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 69-70 Failed 2/71 tests, 97.18% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/04_guest_image.t 2 512 71 2 2.82% 69-70 Failed 1/4 test scripts, 75.00% okay. 2/242 subtests failed, 99.17% okay. make: *** [test_dynamic] Error 2 adam@red:~/pita/trunk/PITA$ prove -br t/01_compile...........ok t/02_support_server....ok t/03_guest.............ok t/04_guest_image.......NOK 71 # Failed test 'Support server stopped at the right time' # in t/04_guest_image.t at line 205. # CVSROOT: :pserver:adam@red.phase-n.com:/var/lib/cvs # HARNESS_ACTIVE: 1 # HARNESS_VERSION: 2.56 # HOME: /home/adam # LANG: en_US # LANGUAGE: en_US:en_GB:en # LOGNAME: adam # MAIL: /var/mail/adam # OLDPWD: /home/adam/pita/trunk # PATH: /home/adam/CPAN/tools/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games # PERL5LIB: # PWD: /home/adam/pita/trunk/PITA # SHELL: /bin/bash # SHLVL: 1 # SSH_CLIENT: ::ffff:202.90.48.125 2695 22 # SSH_CONNECTION: ::ffff:202.90.48.125 2695 ::ffff:202.90.48.198 22 # SSH_TTY: /dev/pts/0 # TERM: xterm # TEST_VERBOSE: 1 # USER: adam # _: /usr/bin/prove # Looks like you failed 1 test of 71. t/04_guest_image.......dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 71 Failed 1/71 tests, 98.59% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/04_guest_image.t 1 256 71 1 1.41% 71 Failed 1/4 test scripts, 75.00% okay. 1/242 subtests failed, 99.59% okay. adam@red:~/pita/trunk/PITA$ export PERL5LIB="/home/adam/pita/trunk/PITA/inc:/home/adam/pita/trunk/PITA/blib/lib:/home/adam/pita/trunk/PITA/blib/arch"
Fixed in 2.99, thanks.