On Wed, 17 Sep 2003, Steve Hay wrote:
Stas Bekman wrote:
Steve Hay wrote:
I tried running "perl t/SMOKE" but I just get this:
===== C:\Temp\modperl-2.0>perl t/SMOKE *** Using random number seed: 1012582729 (autogenerated) *** ------------------------------------------------------------ *** [001-00-00] trying all tests 10 times !!! failed to start server '.' is not recognized as an internal or external command, operable program or batch file. =====
Yup, it needs tweaking to run on win32.
Here's a first stab at a patch to get t/SMOKE running on Win32. I tried to localize the Win32 changes by putting them in their own sub. The full functionality is probably not all there - it still needs more testing - but it does seem workable in principle.
Replicating the smoking logic more than once is not so good, for obvious reasons. The logic should be written only once and any supporting functionality should be abstracted into functions called by that logic code. Since t/TEST works just fine on win32, there shouldn't be any special code in TestSmoke, besides the new functionality, which is just starting a new process and then reading from the process's STDOUT in the line mode. Any test names mungling don't belong here.
Notice that I've temprorary complicated the logic to do:
1) start the server, 2) run a single test, check the results, scan fs for core files, go to 2 3) stop the server
because Test::Harness doesn't support a post-single-test-run action. and I needed to scan for core files and get the relevant error messages for the test that failed, rather than trying to fish it out from error_log after the run is completed. However it's going to change hopefully soon and SMOKE will go back to the simple mode of running t/TEST and parsing its output, as soon as Test::Harness::Straps support that new feature (post-single-test-run callback). So what we really want on win32 is be able to start a process, read from its output in the line mode and stop the server. Similar to IPC::Run's API.
Randy, do you think it's going to be hard to fix IPC::Run do the right thing on win32? If IPC::Run is fixed, we don't need to add win32 cruft to our code.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]