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/common.pl

Thread Previous | Thread Next
From:
bulk88 via RT
Date:
March 7, 2013 03:32
Subject:
[perl #116971] make test tries to use a different perl than the one being build, /t/lib/croak.t t/lib/common.pl
Message ID:
rt-3.6.HEAD-28177-1362627168-556.116971-15-0@perl.org
On Wed Mar 06 16:54:13 2013, bulk88 wrote:
> If it wasn't obvious from my last post,
>
http://perl5.git.perl.org/perl.git/commit/9c5b8d56084afc9da630a00b5bab6b257f62d1aa
> did fix alot of the failures I saw so it is the correct/working fix.
> 

While debugging, I found some code
http://perl5.git.perl.org/perl.git/commitdiff/4013a0e1f891d6d7f41d456bab1a516334fddad8?hp=79b01a68c72bb52b3469bd03bbe6d75bd93c9400
that looked suspicious, but ultimately I dont think it is related to
porting/pod_rules.t going out of its build dir

Anyways,

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

BEGIN {
    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/test.pl';

_________________________________________________________________
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/Open3.pm line 404.
	IPC::Open3::spawn_with_handles('ARRAY(0x38fa3a8)', 'ARRAY(0x3a50fe0)',
'./perl', '-I..', '-MTestInit', 'porting/pod_rules.t') called at
../lib/IPC/Open3.pm line 329
	eval {...} called at ../lib/IPC/Open3.pm line 328
	IPC::Open3::_open3('open3', '<&STDIN', 'IO::Handle=GLOB(0x38f5478)',
'>&STDERR', './perl', '-I..', '-MTestInit', 'porting/pod_rules.t')
called at ../lib/IPC/Open3.pm line 352
	IPC::Open3::open3('<&STDIN', 'IO::Handle=GLOB(0x38f5478)', '>&STDERR',
'./perl', '-I..', '-MTestInit', 'porting/pod_rules.t') called at
../lib/TAP/Parser/Iterator/Process.pm line 154
	eval {...} called at ../lib/TAP/Parser/Iterator/Process.pm line 153
	TAP::Parser::Iterator::Process::_initialize('TAP::Parser::Iterator::Process=HASH(0x38f5040)', 'HASH(0x38f3bc0)') called at ../lib/TAP/Object.pm line 58
	TAP::Object::new('TAP::Parser::Iterator::Process', 'HASH(0x38f3bc0)')
called at ../lib/TAP/Parser/SourceHandler/Executable.pm line 124
	TAP::Parser::SourceHandler::Executable::make_iterator('TAP::Parser::SourceHandler::Executable', 'TAP::Parser::Source=HASH(0x357cdd8)') called at ../lib/TAP/Parser/IteratorFactory.pm line 219
	TAP::Parser::IteratorFactory::make_iterator('TAP::Parser::IteratorFactory=HASH(0x38f3878)', 'TAP::Parser::Source=HASH(0x357cdd8)') called at ../lib/TAP/Parser.pm line 469
	TAP::Parser::_initialize('TAP::Parser=HASH(0x38f3650)',
'HASH(0x3258910)') called at ../lib/TAP/Object.pm line 58
	TAP::Object::new('TAP::Parser', 'HASH(0x3258910)') called at
../lib/TAP/Object.pm line 133
	TAP::Object::_construct('TAP::Harness=HASH(0x3746a98)', 'TAP::Parser',
'HASH(0x3258910)') called at ../lib/TAP/Harness.pm line 779
	TAP::Harness::make_parser('TAP::Harness=HASH(0x3746a98)',
'TAP::Parser::Scheduler::Job=HASH(0x38d8d88)') called at
../lib/TAP/Harness.pm line 578
	TAP::Harness::_aggregate_single('TAP::Harness=HASH(0x3746a98)',
'TAP::Parser::Aggregator=HASH(0x38d8998)',
'TAP::Parser::Scheduler=HASH(0x38ebf98)') called at
../lib/TAP/Harness.pm line 670
	TAP::Harness::aggregate_tests('TAP::Harness=HASH(0x3746a98)',
'TAP::Parser::Aggregator=HASH(0x38d8998)', 'porting/pod_rules.t') called
at ../lib/TAP/Harness.pm line 485
	TAP::Harness::__ANON__[../lib/TAP/Harness.pm:487]() called at
../lib/TAP/Harness.pm line 498
	TAP::Harness::runtests('TAP::Harness=HASH(0x3746a98)',
'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/XSLoader.pm line 68.
 at ../lib/re.pm line 85.
Compilation failed in require at ../lib/Text/Wrap.pm line 58.
BEGIN failed--compilation aborted at ../lib/Text/Wrap.pm line 58.
Compilation failed in require at Porting/pod_rules.pl line 6.
BEGIN failed--compilation aborted at Porting/pod_rules.pl line 6.

C:\p517\g\t>
_______________________________________________________________


The chdir call in pod_rules.t blames to
http://perl5.git.perl.org/perl.git/commit/d89d11bb61c88f4f5acf442100f3e689da2f7018?f=t/porting/pod_rules.t
.

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
http://perl5.git.perl.org/perl.git/blob/8818c98f34d13483ef3f7e76a69e429397237efe:/t/TEST#l261

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

podcheck.t
_________________________________________________
BEGIN {
    chdir 't';
    unshift @INC, "../lib";
}
_________________________________________________
regen.t
_________________________________________________
#!./perl -w

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

BEGIN {
    @INC = '..' if -f '../TestInit.pm';
}
use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute
use strict;
_______________________________________________
args_assert.t
_______________________________________________
#!perl

use strict;
use warnings;

require './test.pl';

plan('no_plan');

# 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
portable.
    $prefix = '../';
}
_________________________________________________________
maintainers.t
_________________________________________________________
#!./perl -w

# Test that there are no missing Maintainers in Maintainers.pl

BEGIN {
	# 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/test.pl';
}
_________________________________________________________


-- 
bulk88 ~ bulk88 at hotmail.com

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=116971

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About