Skip Menu |
 

This queue is for tickets about the Plerd CPAN distribution.

Report information
The Basics
Id: 127877
Status: resolved
Priority: 0/
Queue: Plerd

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

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



Subject: System perl used in tests
Download (untitled) / with headers
text/plain 884b
It seems that the test suite fails if the first perl in the user's $PATH is not the perl used for running the build (it looks like a dependency error, but it isn't): ... Can't locate namespace/autoclean.pm in @INC (@INC contains: ... .) at /home/cpansand/.cpan/build/2018120104/File-ChangeNotify-0.29-0/blib/lib/File/ChangeNotify.pm line 5. BEGIN failed--compilation aborted at /home/cpansand/.cpan/build/2018120104/File-ChangeNotify-0.29-0/blib/lib/File/ChangeNotify.pm line 5. Compilation failed in require at /home/cpansand/.cpan/build/2018120104/Plerd-1.7-0/t/../bin/plerdwatcher line 11. BEGIN failed--compilation aborted at /home/cpansand/.cpan/build/2018120104/Plerd-1.7-0/t/../bin/plerdwatcher line 11. Tried to launch a plerdwatcher test instance, but no PID file found. at t/daemon.t line 79. t/daemon.t .. Dubious, test returned 2 (wstat 512, 0x200) No subtests run ...
Download (untitled) / with headers
text/plain 325b
Hello, Plerd's author here... I'm not sure what to do about this. Using one perl environment to build and then another one to test sounds to me like a fault with the tester, and a pattern that would fail with any candidate Perl module or program with CPAN dependencies. But the implication here is that this is not the case?
Download (untitled) / with headers
text/plain 1.1k
On 2018-12-08 20:45:27, JMAC wrote: Show quoted text
> Hello, Plerd's author here... > > I'm not sure what to do about this. Using one perl environment to > build and then another one to test sounds to me like a fault with the > tester, and a pattern that would fail with any candidate Perl module > or program with CPAN dependencies. But the implication here is that > this is not the case?
I looked into the plerdwatch script and one problem is the usage of the shebang "#!/usr/bin/env perl". Normally ExtUtils::MakeMaker would take care of rewriting the shebang to the correct perl (the one used to build the distribution), but this does not happen in this case. See https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/issues/58 about this issue. So the solution would be to use something like "#!/usr/bin/perl" or just "#!perl". The other problem is that the rewritten shebang would be only available after "make install". During "make test" time the rewritten version is already available in blib/script, so you could try to call your script from that location. Alternatively you can call the script using something like "$^X bin/..." --- this would be a workaround to get the right perl interpreter.
Download (untitled) / with headers
text/plain 595b
On Sun Dec 09 02:04:59 2018, SREZIC wrote: Show quoted text
> I looked into the plerdwatch script and one problem is the usage of > the shebang "#!/usr/bin/env perl". [...]
This is a very clear explanation of the problem. Thank you! Show quoted text
> Alternatively you can call the script > using something like "$^X bin/..." --- this would be a workaround to > get the right perl interpreter.
If I understand you correctly, the specific change you're suggesting is to line 70 of daemon.t, and turning 'perl' into "$^X"... is that right? (Unless I'm mistaken, this is the only time Plerd's tests invoke perl via the system.)
Download (untitled) / with headers
text/plain 994b
On 2018-12-09 11:24:55, JMAC wrote: Show quoted text
> On Sun Dec 09 02:04:59 2018, SREZIC wrote: >
> > I looked into the plerdwatch script and one problem is the usage of > > the shebang "#!/usr/bin/env perl". [...]
> > This is a very clear explanation of the problem. Thank you! >
> > Alternatively you can call the script > > using something like "$^X bin/..." --- this would be a workaround to > > get the right perl interpreter.
> > If I understand you correctly, the specific change you're suggesting > is to line 70 of daemon.t, and turning 'perl' into "$^X"... is that > right? (Unless I'm mistaken, this is the only time Plerd's tests > invoke perl via the system.)
I tried diff --git a/t/daemon.t b/t/daemon.t index a433350..3d25ae6 100644 --- a/t/daemon.t +++ b/t/daemon.t @@ -67,7 +67,7 @@ END $config_file_path->spew( $config ); system( - 'perl', + $^X, '-I', "$FindBin::Bin/../lib/", $daemon, "--config=$config_file_path", --- and "make test" was then successful.
Super duper. I'll give it a whirl.
Download (untitled) / with headers
text/plain 213b
On 2018-12-09 11:39:32, JMAC wrote: Show quoted text
> Super duper. I'll give it a whirl.
Looks much better now. There are still some test failures on some systems, but this is probably due to other reasons. Closing this issue.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.