>>>>> "LT" == Leopold Toetsch <[EMAIL PROTECTED]> writes:

  LT> The attached t/pmc/signal.t should send a SIGINT to a sleeping or
  LT> looping PASM test. This basically works, but the test output looks a
  LT> bit ugly:

  LT> t/pmc/signal............# No tests run!
  LT> t/pmc/signal............ok 1/2# Looks like you planned 2 tests but
  LT> only ran 1.
  LT> t/pmc/signal............ok

  LT> It seems, that due to the fork, the test system is getting an empty
  LT> test result too.

Test::* can't handle output from forked children (it traps redirect
STDOUT in the current process so it has no access to STDOUT of a
child). this is a known problem. there are several ways around it. one,
have the child signal the parent which can then report test
results. two, have the child send data back to the parent (via a pipe or
even a temp file) and then have the parent report results. you can also
signal yourself and not need a child. i have a test script for event
loops that works in a single process (it uses a socketpair to test i/o
events). i can send it to you if you want. obviously it will need major
changes to test parrot but the overall setup and test stuff should be
useful to you.

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Reply via email to