Hi Steffen,

How about setting which tests to run explicitly? The following change to
Makefile.PL does it.


my $pgentest = (!$par and $cc) ? ' t/10-parl-generation.t ' : '';
my $tests = qq(t/00-pod.t$pgentest t/20-pp.t t/30-current_exec.t);
makemaker_args(
        test => { TESTS => $tests },


of course, it means you have to update Makefile.PL if you add extra test
scripts - but it is the simplest way I could think of.

Regards

Mark
     


Steffen Mueller wrote:
> Hi Mark,
>
> Mark Dootson schrieb:
>> The correct way to handle this is to skip all the t/10-parl-generation
>> tests if installing using the downloadable PAR dist.
>
> I agree. At first, I thought this would be really simple and was going
> to do just that. However, the tricky part is to determine during "make
> test" whether the pre-built .par was used or not. I got this far:
>
> 1) During Makefile.PL modify the Makefile that's written out so
> 2) the Makefile sets an environment variable (If that's possible in a
> portable way!)
> 3) which can be tested against by the test script.
>
> The tricky bit is that Module::Install is such a weird beast that I
> can't figure out how to modify the Makefile from Makefile.PL. I'd
> rather not add a PAR::Packer local M::I subclass to inc/ because I'd
> most certainly delete it by accident before doing a release... And it
> seems overkill anyway.
>
> Another route might be to test for some file's existence in the test
> script, but that seems even worse.
>
> Better ideas?
>
> Cheers,
> Steffen


Reply via email to