perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <>
Subject Re: t/SMOKE on win32
Date Thu, 09 Oct 2003 05:53:08 GMT
On Wed, 8 Oct 2003, Stas Bekman wrote:

> Randy Kobes wrote:
[ ... ]
> Thanks, Randy. And if you run:
> perl t/TEST -start
> perl t/TEST -run testname
> perl t/TEST -stop

This works ...

> if this still works, what if you run TestSmoke's test_run alone by ripping it
> off and just hardcoding things?

I'll take a look at this, but see below ...

> > I've attached a patch (for Steve's benefit, as it's Win32
> > specific) which, first of all, uses Win32::Process (to
> > rule out problems coming from IPC::Run3), and which defines
> > two functions:
> >    run_command - uses system() to run a command, and
> >                  returns a flag indicating success;
> >    run_command_dup - uses Win32::Process to run a command,
> >                      capturing the STDOUT and STDERR and
> >                      then returning the text.
> >
> > - if one uses run_command_dup to start/stop the server and
> > run the tests, then the error with failing to dup STDOUT
> > results, for those tests that use perl-script.
> > - if one uses run_command_dup to start/stop the server, but
> > uses run_command to run the tests, then the same error
> > results.
> > - if one uses run_command to start/stop the server and run
> > the tests, then all tests pass.
> What about the 4th option:
> - if one uses run_command to start/stop the server and
> uses run_command_dup to run the tests, ...

That works! So the problem seems to be in starting the
server with a dup/redirect of STDOUT/STDERR; if one does
it with just a system call:
   my @args = split ' ', $start_command;
then it seems OK to do the dup/redirect when running
the tests (I tested this with Win32::Process, but
I imagine the same thing would hold for IPC::Run3).

Like you mentioned earlier, though, Stas, there doesn't
seem to be any reason why doing something like this
on the client side would affect the server side. Might
there be though in starting the server?

> also isn't the third option exactly what we have now with
> IPC::Run? (i.e.  using system everywhere?)

The system() call I used was just that, with no STD

best regards,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message