Skip Menu |

This queue is for tickets about the TaskPipe CPAN distribution.

Report information
The Basics
Id: 127713
Status: open
Priority: 0/
Queue: TaskPipe

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.06
Fixed in: (no value)



Subject: System perl used in tests
It seems that the system perl (the first perl in $PATH) and not the perl currently used for building and testing the distribution is used in the test suite, causing some test scripts to fail: ... Running resume mechanism tests. Please be patient - this will take some time Can't locate Moose.pm in @INC (you may need to install the Moose module) (@INC contains: ... /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /home/cpansand/.local/share/.cpan/build/2018111802/MooseX-ConfigCascade-0.02-0/blib/lib/MooseX/ConfigCascade/Util.pm line 3. BEGIN failed--compilation aborted at /home/cpansand/.local/share/.cpan/build/2018111802/MooseX-ConfigCascade-0.02-0/blib/lib/MooseX/ConfigCascade/Util.pm line 3. Compilation failed in require at scripts/taskpipe-xtask line 4. BEGIN failed--compilation aborted at scripts/taskpipe-xtask line 4. # Failed test 'mode: id count: 1 preops: 0 specs: {"city":2,"company":2,"employee":0,"threads":1} Number of records on city table' # at t/lib/TaskPipe/TestUtils/Resume.pm line 95. # got: '0' # expected: '2' ... # Looks like you failed 108 tests of 126. t/03_single_thread_resume.t .. Dubious, test returned 108 (wstat 27648, 0x6c00) Failed 108/126 subtests ... # Looks like your test exited with 2 just after 2. t/04_plan.t .................. Dubious, test returned 2 (wstat 512, 0x200) Failed 73/73 subtests Probably somewhere $^X has to be used, or alternatively scripts already installed in blib/script called.
On 2018-11-18 05:11:43, SREZIC wrote: Show quoted text
> It seems that the system perl (the first perl in $PATH) and not the > perl currently used for building and testing the distribution is used > in the test suite, causing some test scripts to fail: > > ... > Running resume mechanism tests. Please be patient - this will take > some time > Can't locate Moose.pm in @INC (you may need to install the Moose > module) (@INC contains: ... /etc/perl /usr/local/lib/x86_64-linux- > gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux- > gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 > /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux- > gnu/perl-base .) at > /home/cpansand/.local/share/.cpan/build/2018111802/MooseX- > ConfigCascade-0.02-0/blib/lib/MooseX/ConfigCascade/Util.pm line 3. > BEGIN failed--compilation aborted at > /home/cpansand/.local/share/.cpan/build/2018111802/MooseX- > ConfigCascade-0.02-0/blib/lib/MooseX/ConfigCascade/Util.pm line 3. > Compilation failed in require at scripts/taskpipe-xtask line 4. > BEGIN failed--compilation aborted at scripts/taskpipe-xtask line 4. > > # Failed test 'mode: id count: 1 preops: 0 specs: > {"city":2,"company":2,"employee":0,"threads":1} Number of records on > city table' > # at t/lib/TaskPipe/TestUtils/Resume.pm line 95. > # got: '0' > # expected: '2' > ... > # Looks like you failed 108 tests of 126. > t/03_single_thread_resume.t .. > Dubious, test returned 108 (wstat 27648, 0x6c00) > Failed 108/126 subtests > ... > # Looks like your test exited with 2 just after 2. > t/04_plan.t .................. > Dubious, test returned 2 (wstat 512, 0x200) > Failed 73/73 subtests > > > Probably somewhere $^X has to be used, or alternatively scripts > already installed in blib/script called.
Same problem with 0.07, it seems.
On Tue Nov 20 16:59:43 2018, SREZIC wrote: Show quoted text
> On 2018-11-18 05:11:43, SREZIC wrote:
> > It seems that the system perl (the first perl in $PATH) and not the > > perl currently used for building and testing the distribution is used > > in the test suite, causing some test scripts to fail: > > > > ... > > Running resume mechanism tests. Please be patient - this will take > > some time > > Can't locate Moose.pm in @INC (you may need to install the Moose > > module) (@INC contains: ... /etc/perl /usr/local/lib/x86_64-linux- > > gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux- > > gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 > > /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux- > > gnu/perl-base .) at > > /home/cpansand/.local/share/.cpan/build/2018111802/MooseX- > > ConfigCascade-0.02-0/blib/lib/MooseX/ConfigCascade/Util.pm line 3. > > BEGIN failed--compilation aborted at > > /home/cpansand/.local/share/.cpan/build/2018111802/MooseX- > > ConfigCascade-0.02-0/blib/lib/MooseX/ConfigCascade/Util.pm line 3. > > Compilation failed in require at scripts/taskpipe-xtask line 4. > > BEGIN failed--compilation aborted at scripts/taskpipe-xtask line 4. > > > > # Failed test 'mode: id count: 1 preops: 0 specs: > > {"city":2,"company":2,"employee":0,"threads":1} Number of records on > > city table' > > # at t/lib/TaskPipe/TestUtils/Resume.pm line 95. > > # got: '0' > > # expected: '2' > > ... > > # Looks like you failed 108 tests of 126. > > t/03_single_thread_resume.t .. > > Dubious, test returned 108 (wstat 27648, 0x6c00) > > Failed 108/126 subtests > > ... > > # Looks like your test exited with 2 just after 2. > > t/04_plan.t .................. > > Dubious, test returned 2 (wstat 512, 0x200) > > Failed 73/73 subtests > > > > > > Probably somewhere $^X has to be used, or alternatively scripts > > already installed in blib/script called.
> > Same problem with 0.07, it seems. >
Hi Slaven Many thanks for testing this - and sorry for the trouble with repeated errors. In fact I think the problems with 0.06 and 0.07 were not quite the same. I have been working on the core threading mechanism and I wanted to include some optional multithreaded tests, but I mistakenly include config files which meant those were being kicked off automatically rather than being skipped if they were not selected when Makefile.PL was run. Hoping this is now resolved in 0.08(?) I am also hoping the most difficult/ugly to write tests (ie related to threading) are now out of the way, and with future releases it should be easier to extend the test framework. Really appreciate your help cheers Tom
On 2018-11-21 10:45:35, TOMGRACEY wrote: Show quoted text
> On Tue Nov 20 16:59:43 2018, SREZIC wrote:
> > On 2018-11-18 05:11:43, SREZIC wrote:
> > > It seems that the system perl (the first perl in $PATH) and not the > > > perl currently used for building and testing the distribution is > > > used > > > in the test suite, causing some test scripts to fail: > > > > > > ... > > > Running resume mechanism tests. Please be patient - this will take > > > some time > > > Can't locate Moose.pm in @INC (you may need to install the Moose > > > module) (@INC contains: ... /etc/perl /usr/local/lib/x86_64-linux- > > > gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux- > > > gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 > > > /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64- > > > linux- > > > gnu/perl-base .) at > > > /home/cpansand/.local/share/.cpan/build/2018111802/MooseX- > > > ConfigCascade-0.02-0/blib/lib/MooseX/ConfigCascade/Util.pm line 3. > > > BEGIN failed--compilation aborted at > > > /home/cpansand/.local/share/.cpan/build/2018111802/MooseX- > > > ConfigCascade-0.02-0/blib/lib/MooseX/ConfigCascade/Util.pm line 3. > > > Compilation failed in require at scripts/taskpipe-xtask line 4. > > > BEGIN failed--compilation aborted at scripts/taskpipe-xtask line 4. > > > > > > # Failed test 'mode: id count: 1 preops: 0 specs: > > > {"city":2,"company":2,"employee":0,"threads":1} Number of records > > > on > > > city table' > > > # at t/lib/TaskPipe/TestUtils/Resume.pm line 95. > > > # got: '0' > > > # expected: '2' > > > ... > > > # Looks like you failed 108 tests of 126. > > > t/03_single_thread_resume.t .. > > > Dubious, test returned 108 (wstat 27648, 0x6c00) > > > Failed 108/126 subtests > > > ... > > > # Looks like your test exited with 2 just after 2. > > > t/04_plan.t .................. > > > Dubious, test returned 2 (wstat 512, 0x200) > > > Failed 73/73 subtests > > > > > > > > > Probably somewhere $^X has to be used, or alternatively scripts > > > already installed in blib/script called.
> > > > Same problem with 0.07, it seems. > >
> > Hi Slaven > > Many thanks for testing this - and sorry for the trouble with repeated > errors. In fact I think the problems with 0.06 and 0.07 were not quite > the same. I have been working on the core threading mechanism and I > wanted to include some optional multithreaded tests, but I mistakenly > include config files which meant those were being kicked off > automatically rather than being skipped if they were not selected when > Makefile.PL was run. Hoping this is now resolved in 0.08(?) I am also > hoping the most difficult/ugly to write tests (ie related to > threading) are now out of the way, and with future releases it should > be easier to extend the test framework. > Really appreciate your help > cheers > Tom
Still I see the same problem with 0.08. I think the problem is that the two scripts in the "scripts" subdirectory have "/usr/bin/env perl" as the shebang. In my installations the system perl is before any other perl in my $PATH (and most perls are not in $PATH at all), so during tests the wrong perl will be used which does not have the required dependencies installed, hence the failures. Attached is a patch which fixes the problem on my system (tested with perl 5.28.0 on a debian/stretch system). However the patch needs more polishing (e.g. maybe for Windows?). What it does is: * Change the shebang of the two scripts to something which contains "perl" in the first component (and not "env"). This way the currently used perl will be replaced into the shebang for the final installation. There's a long-standing issue to make this replacement even for /usr/bin/env (see https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/issues/58 ) but unfortunately it is not done yet. * The test library calls the scripts now from "blib/script", not from "scripts". In "blib/script" the final version of the scripts with the corrected shebang is already available. Regards, Slaven
Subject: Taskpipe-0.08.patch
diff --git a/scripts/taskpipe b/scripts/taskpipe index 00834ea..b6fda90 100755 --- a/scripts/taskpipe +++ b/scripts/taskpipe @@ -1,4 +1,4 @@ -#!/usr/bin/env perl +#!/usr/bin/perl use strict; use warnings; diff --git a/scripts/taskpipe-xtask b/scripts/taskpipe-xtask index 4118012..0b6e065 100755 --- a/scripts/taskpipe-xtask +++ b/scripts/taskpipe-xtask @@ -1,4 +1,4 @@ -#!/usr/bin/env perl +#!/usr/bin/perl use strict; use warnings; use MooseX::ConfigCascade::Util; diff --git a/t/lib/TaskPipe/TestUtils/Basic.pm b/t/lib/TaskPipe/TestUtils/Basic.pm index 259c947..f5d2dea 100644 --- a/t/lib/TaskPipe/TestUtils/Basic.pm +++ b/t/lib/TaskPipe/TestUtils/Basic.pm @@ -116,7 +116,7 @@ sub run_plan{ MooseX::ConfigCascade::Util->conf->{'TaskPipe::Task::Settings'}{'xbranch_key_mode'} = $p{key_mode}; } - MooseX::ConfigCascade::Util->conf->{'TaskPipe::TaskUtils::Settings'}{'xtask_script'} = 'scripts/taskpipe-xtask'; + MooseX::ConfigCascade::Util->conf->{'TaskPipe::TaskUtils::Settings'}{'xtask_script'} = 'blib/script/taskpipe-xtask'; $self->cmdh->handler->job_manager->init_job;