You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@perl.apache.org by "Christopher H. Laco" <cl...@chrislaco.com> on 2005/04/01 02:29:51 UTC

win32 won't take apache.exe path under Module::Build

After I started a big crapstorm on perl-qa about META.yml and 
Module::Build, I now have to take my lumps and start using it. :-)

Following the TestMB pod, I have a working Build.PL that also calls:

$build->generate_script('t/TEST');
$build->generate_script('t/SMOKE');

'perl Build.PL' runs without errors. When I run 'perl Build test', I get 
the endless loop of A::T looking for the Apache binary
  [see attached: output.txt]

Of course, I didn't have this problem under Makefile.PL, and my 
TestConfigData.pm looks like this:

> $Apache::TestConfigData::vars = {
>     'httpd' => 'C:\Development\Apache584\Apache.exe',
>     'port' => '8529',
> 
> };

This is under Apache::Test 1.21 on 5.8.4.

Any ideas?
Thanks,
-=Chris

Re: win32 won't take apache.exe path under Module::Build

Posted by "Christopher H. Laco" <cl...@chrislaco.com>.
William McKee wrote:
> On Thu, Mar 31, 2005 at 07:29:51PM -0500, Christopher H. Laco wrote:
> 
>>Any ideas?
> 
> 
> Chris,
> 
> I've seen this happen before. Please post your entire Build.PL script.
> Even better, take Ken's bug-reporting skeleton[1] and create a
> reproducible example that we can try.
> 
> 
> William
> 
> [1] http://perl.apache.org/docs/general/testing/testing.html#References
> 

Yeah, duh. Great idea.
It should just be a matter of adding a Build.PL to the skeleton right?
I may have to manually add both the t/TEST.PL and th t/SMOKE.PL to get 
it to run the wrong thing; hopefully.

-=Chris

Re: win32 won't take apache.exe path under Module::Build

Posted by William McKee <wi...@knowmad.com>.
On Tue, Apr 12, 2005 at 08:48:07AM -0400, Christopher H. Laco wrote:
> Actually no, I haven't removed SMOKE.PL. Why would I want to?
> Once I'm done with another round of code changes, I hope to get back to 
> figuring this out.

I figured you'd have removed it to prevent the looping when you go to
build your module. At any rate, let us know what you find out.


Thanks,
William

-- 
Knowmad Services Inc.
http://www.knowmad.com

Re: win32 won't take apache.exe path under Module::Build

Posted by "Christopher H. Laco" <cl...@chrislaco.com>.
William McKee wrote:
> Hi Chris,
> 
> Thanks for the extensive testing and reports. It will help me debug the
> next time I run into this situation. Unfortunately I'm not familiar
> enough with the innards of A::T to be of any further help. If you want
> to continue tracking, perhaps you could try running your Build.PL
> through the debugger to find where it's looping. Otherwise, I'm sure
> you've already taken the measure to remove the SMOKE.PL from your
> build script.
> 
> 
> Regards,
> William
> 

Actually no, I haven't removed SMOKE.PL. Why would I want to?
Once I'm done with another round of code changes, I hope to get back to 
figuring this out.

-=Chris

Re: win32 won't take apache.exe path under Module::Build

Posted by William McKee <wi...@knowmad.com>.
Hi Chris,

Thanks for the extensive testing and reports. It will help me debug the
next time I run into this situation. Unfortunately I'm not familiar
enough with the innards of A::T to be of any further help. If you want
to continue tracking, perhaps you could try running your Build.PL
through the debugger to find where it's looping. Otherwise, I'm sure
you've already taken the measure to remove the SMOKE.PL from your
build script.


Regards,
William

-- 
Knowmad Services Inc.
http://www.knowmad.com

Re: win32 won't take apache.exe path under Module::Build

Posted by "Christopher H. Laco" <cl...@chrislaco.com>.
William McKee wrote:
> On Thu, Mar 31, 2005 at 07:29:51PM -0500, Christopher H. Laco wrote:
> 
>>Any ideas?
> 
> 
> Chris,
> 
> I've seen this happen before. Please post your entire Build.PL script.
> Even better, take Ken's bug-reporting skeleton[1] and create a
> reproducible example that we can try.
> 
> 
> William
> 
> [1] http://perl.apache.org/docs/general/testing/testing.html#References
> 

Ok, here's what I've got. I downloaded the MP1 skeleton and extracted:

    perl Makefile.PL
    nmake
    nmake test

Passes all tests pass and it uses my apache.exe from TestConfigData.

--------

Delete directory. Reextract skeleton.
Now, I add a simple Build.PL file (See attached: Build.PL.basic)

    perl Build.PL
    perl Build
    perl Build test

Passes all tests pass and it uses my apache.exe from TestConfigData.


--------

Delete directory. Reextract skeleton.
Now, I add s simple Build.PL with a call to generate_script('t/SMOKE')
(See attached: Build.PL.smoke) and I add SMOKE.PL to t/

    perl Build.PL
    perl Build
    perl Build test

Endless loop asking for location of Apache.exe.
> [warning] running with new config opts:  -httpd C:\Development\Apache584\Apache.exe
> C:\Development\Perl\584\bin\perl.exe -I C:\Apache-Test-skeleton-mp1\blib\lib -I C:\Apache-Test-skeleton-mp1\blib\arch t\SMOKE -bugreport -ve
> rbose=0
> '-httpd' is not recognized as an internal or external command,
> operable program or batch file.
> 
> 
> We are now going to configure the Apache-Test framework.
> This configuration process needs to be done only once.



--------

Delete directory. Reextract skeleton.
Repeat with Build.PL with generate_script for t/TEST and t/SMOKE, adding
TEST.PL and SMOKE.PL in t/.

Same results. Endless loop.

---------



Now, I know that in the MB version, you don't need to generate t/TEST,
it's done automatically. But since the old MakeMaker way had both, I
left them both in my conversion to M::B


Hopefully this helps.
This is under win32 (XP Pro), perl 5.8.4, A::T 1.21, and M::B 0.2609

-=Chris


[This is a resend. This lists' postfix won't take attachments? (.zip)...]



Build.PL.basic
--
use Module::Build;
my $build_pkg = eval { require Apache::TestMB }
   ? 'Apache::TestMB' : 'Module::Build';

my $build = $build_pkg->new(
   module_name        => 'Apache::Handler'
);
$build->create_build_script;





Build.PL.smoke
--
use Module::Build;
my $build_pkg = eval { require Apache::TestMB }
   ? 'Apache::TestMB' : 'Module::Build';

my $build = $build_pkg->new(
   module_name        => 'Apache::Handler'
);
$build->generate_script('t/SMOKE');
$build->create_build_script;




Build.PL.all
--
use Module::Build;
my $build_pkg = eval { require Apache::TestMB }
   ? 'Apache::TestMB' : 'Module::Build';

my $build = $build_pkg->new(
   module_name        => 'Apache::Handler'
);
$build->generate_script('t/TEST');
$build->generate_script('t/SMOKE');
$build->create_build_script;




TEST.PL
--
use strict;
use warnings FATAL => 'all';
use lib qw(lib);
use Apache::TestRunPerl ();
Apache::TestRunPerl->new->run(@ARGV);



SMOKE.PL
--
use strict;
use warnings FATAL => 'all';
use lib qw(lib);
use Apache::TestSmoke ();
Apache::TestSmoke->new(@ARGV)->run;

Re: win32 won't take apache.exe path under Module::Build

Posted by William McKee <wi...@knowmad.com>.
On Thu, Mar 31, 2005 at 07:29:51PM -0500, Christopher H. Laco wrote:
> Any ideas?

Chris,

I've seen this happen before. Please post your entire Build.PL script.
Even better, take Ken's bug-reporting skeleton[1] and create a
reproducible example that we can try.


William

[1] http://perl.apache.org/docs/general/testing/testing.html#References

-- 
Knowmad Services Inc.
http://www.knowmad.com

Re: win32 won't take apache.exe path under Module::Build

Posted by "Christopher H. Laco" <cl...@chrislaco.com>.
Christopher H. Laco wrote:
> After I started a big crapstorm on perl-qa about META.yml and 
> Module::Build, I now have to take my lumps and start using it. :-)
> 
> Following the TestMB pod, I have a working Build.PL that also calls:
> 
> $build->generate_script('t/TEST');
> $build->generate_script('t/SMOKE');
> 
> 'perl Build.PL' runs without errors. When I run 'perl Build test', I get 
> the endless loop of A::T looking for the Apache binary
>  [see attached: output.txt]
> 
> Of course, I didn't have this problem under Makefile.PL, and my 
> TestConfigData.pm looks like this:
> 
>> $Apache::TestConfigData::vars = {
>>     'httpd' => 'C:\Development\Apache584\Apache.exe',
>>     'port' => '8529',
>>
>> };
> 
> 
> This is under Apache::Test 1.21 on 5.8.4.
> 
> Any ideas?
> Thanks,
> -=Chris

Even stranger.

If I run:

	perl Build.PL -httpd C:\Development\Apache584\Apache.exe
	perl Build test

it starts running SMOKE instead of TEST...

> C:\Development\CPAN\Handel>perl Build test
> C:\Development\Perl\584\bin\perl.exe -I C:\Development\CPAN\Handel\blib\lib -I C:\Development\CPAN\Handel\blib\arch t\SMOKE -clean
> [warning] Using random number seed: 1159239462 (autogenerated)
> [   info] Report file: C:\Development\CPAN\Handel\smoke-report-Thu_Mar_31_19-45-02_2005.txt
> [warning]
> ------------------------------------------------------------
> [warning] [001-00-00] trying all tests 10 times



-=Chris