develooper Front page | perl.perl5.porters | Postings from March 2013

[perl #116971] make test tries to use a different perl than the one being build, /t/lib/croak.t t/lib/

Thread Previous | Thread Next
bulk88 via RT
March 7, 2013 03:32
[perl #116971] make test tries to use a different perl than the one being build, /t/lib/croak.t t/lib/
Message ID:
On Wed Mar 06 16:54:13 2013, bulk88 wrote:
> If it wasn't obvious from my last post,
> did fix alot of the failures I saw so it is the correct/working fix.

While debugging, I found some code
that looked suspicious, but ultimately I dont think it is related to
porting/pod_rules.t going out of its build dir


There is a chunk of (modified by me) code in porting/pod_rules.t

    warn "b4 cwd is ".`cd`.' inc is '.join(' ' ,@INC);
    chdir '..' unless -d 't';
    unshift @INC, 'lib';
    warn "after cwd is ".`cd`.' inc is '.join(' ' ,@INC);

use strict;
require 't/';

running it the way the harness script does (Open3 got a Carp::cluck call)
running process cwd is C:\p517\g\t
 at ../lib/IPC/ line 404.
	IPC::Open3::spawn_with_handles('ARRAY(0x38fa3a8)', 'ARRAY(0x3a50fe0)',
'./perl', '-I..', '-MTestInit', 'porting/pod_rules.t') called at
../lib/IPC/ line 329
	eval {...} called at ../lib/IPC/ line 328
	IPC::Open3::_open3('open3', '<&STDIN', 'IO::Handle=GLOB(0x38f5478)',
'>&STDERR', './perl', '-I..', '-MTestInit', 'porting/pod_rules.t')
called at ../lib/IPC/ line 352
	IPC::Open3::open3('<&STDIN', 'IO::Handle=GLOB(0x38f5478)', '>&STDERR',
'./perl', '-I..', '-MTestInit', 'porting/pod_rules.t') called at
../lib/TAP/Parser/Iterator/ line 154
	eval {...} called at ../lib/TAP/Parser/Iterator/ line 153
	TAP::Parser::Iterator::Process::_initialize('TAP::Parser::Iterator::Process=HASH(0x38f5040)', 'HASH(0x38f3bc0)') called at ../lib/TAP/ line 58
	TAP::Object::new('TAP::Parser::Iterator::Process', 'HASH(0x38f3bc0)')
called at ../lib/TAP/Parser/SourceHandler/ line 124
	TAP::Parser::SourceHandler::Executable::make_iterator('TAP::Parser::SourceHandler::Executable', 'TAP::Parser::Source=HASH(0x357cdd8)') called at ../lib/TAP/Parser/ line 219
	TAP::Parser::IteratorFactory::make_iterator('TAP::Parser::IteratorFactory=HASH(0x38f3878)', 'TAP::Parser::Source=HASH(0x357cdd8)') called at ../lib/TAP/ line 469
'HASH(0x3258910)') called at ../lib/TAP/ line 58
	TAP::Object::new('TAP::Parser', 'HASH(0x3258910)') called at
../lib/TAP/ line 133
	TAP::Object::_construct('TAP::Harness=HASH(0x3746a98)', 'TAP::Parser',
'HASH(0x3258910)') called at ../lib/TAP/ line 779
'TAP::Parser::Scheduler::Job=HASH(0x38d8d88)') called at
../lib/TAP/ line 578
'TAP::Parser::Scheduler=HASH(0x38ebf98)') called at
../lib/TAP/ line 670
'TAP::Parser::Aggregator=HASH(0x38d8998)', 'porting/pod_rules.t') called
at ../lib/TAP/ line 485
	TAP::Harness::__ANON__[../lib/TAP/]() called at
../lib/TAP/ line 498
'porting/pod_rules.t') called at C:\p517\g\t\harness line 264

C:\p517\g\t>.\perl -I.. -MTestInit porting/pod_rules.t
b4 cwd is C:\p517\g\t
 inc is ../lib . at porting/pod_rules.t line 4.
after cwd is C:\p517\g
 inc is lib ../lib . at porting/pod_rules.t line 7.
Can't load '../lib/auto/re/re.dll' for module re: load_file:The
specified proced
ure could not be found at ../lib/ line 68.
 at ../lib/ line 85.
Compilation failed in require at ../lib/Text/ line 58.
BEGIN failed--compilation aborted at ../lib/Text/ line 58.
Compilation failed in require at Porting/ line 6.
BEGIN failed--compilation aborted at Porting/ line 6.


The chdir call in pod_rules.t blames to

I can't say anything further since IDK what code is correct and what
isn't, here is what I thought of as code to blame in no particular order

1. this line

in /t/TEST adds "-I.." to the child process's args . 

2. the OOP nightmare called TAP:: should be but isn't chdiring from
"./t" to "./" and should be starting child processes in ./ not ./t

3. pod_rules.t shouldn't be chdiring. Superficially, it looks like the
files in /t/porting all expect to be running from different dirs. Here
are some examples

    chdir 't';
    unshift @INC, "../lib";
#!./perl -w

# Verify that all files generated by perl scripts are up to date.

    @INC = '..' if -f '../';
use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute
use strict;

use strict;
use warnings;

require './';


# Fail for every PERL_ARGS_ASSERT* macro that was declared but not used.

my %declared;
my %used;

my $prefix = '';

unless (-d 't' && -f 'MANIFEST') {
    # we'll assume that we are in t then.
    # All files are internal to perl, so Unix-style is sufficiently
    $prefix = '../';
#!./perl -w

# Test that there are no missing Maintainers in

	# This test script uses a slightly atypical invocation of the 'standard'
	# core testing setup stanza.
	# The existing porting tools which manage the Maintainers file all
	# expect to be run from the root
	# XXX that should be fixed

    chdir '..' unless -d 't';
    @INC = qw(lib Porting);
    require './t/';

bulk88 ~ bulk88 at

via perlbug:  queue: perl5 status: open

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About