Subject: | Can't open perl script "and": No such file or |
Windows XP, ActiveState Perl 5.8.8
This is the classic Windows versus Unix - missing double quotes problem.
The actual directory it should look for is "C:\Documents and Settings\..."
To recreate the error, first set certain environment variables prior to
running "nmake test". That is, Do this on the command line prior to
"nmake test":
----------paste prior to nmake test
set TEST_POD=1
set TEST_HTTP=1
set TEST_HTTP=1
set TEST_LIGHTTPD=1
set TEST_LIGHTTPD=1
set TEST_MEMLEAK=1
set TEST_STRESS=1
set TEST_THREADS=1
-------------end paste prior to nmake test
Now do "nmake test".
On my machine, the test hangs at
------------paste hangs at
t/optional_http-server-restart..............................Can't open
perl script "and": No such file or dire
ctory
-----------end paste hangs at
It is easier to just do
Show quoted text
>prove t\optional_http-server-restart.t
To get past the first part, I went into optional_http-server-restart.t
and made the following modifications, starting with commenting out the
system command as shown.
--------------paste mod 1
#system
# "perl -I$FindBin::Bin/../lib $FindBin::Bin/../script/catalyst.pl
TestApp";
my $i_lib = $FindBin::Bin . "/../lib";
my $catalyst_pl = $FindBin::Bin . "/../script/catalyst.pl";
if (system( "perl", "-I$i_lib", $catalyst_pl, "TestApp")) {
print STDERR ("\n#Cannot system perl -I$i_lib $catalyst_pl TestApp\n");
};
-----------end paste mod 1
------------paste mod 2
#my $pid = open my $server,
#"perl -I$FindBin::Bin/../lib
$FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl -port $port
-restart 2>&1 |"
# or die "Unable to spawn standalone HTTP server: $!";
my $pid = open my $server,
"perl -I\"$i_lib\"
\"$FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl\" -port $port
-restart 2>&1 |"
or die "Unable to spawn standalone HTTP server: $!";
------------end paste mod 2
I also put quotes around "$files[$index]" in a couple of places.
Now it makes it to where it gives the output shown below.
----------paste final output
t\optional_http-server-restart....ok 2/40Server appears to have died at
t\optional_http-server-restart.t line
85.
# Looks like you planned 40 tests but only ran 2.
# Looks like your test died just after 2.
-------------end final output
I do not know where to go with this from here.
The tests are not "Windows directory ready". Is Catalyst? Has anyone
out there been successful at installing Catalyst on Windows?
Can anyone suggest what else I might do here?
By the way, I also made the following change because sleep is not
meant for finer granularities than one second.
----------paste sleep change
#sleep 0.1;
select(undef, undef, undef, 0.1);
die "Server appears to have died $port" if $count++ > 50;
----------end paste sleep change
Thanks