#9599: Allow prove to run tests in the perl debugger

Ovid publiustemp-tapx at yahoo.com
Thu Nov 1 04:43:37 EST 2007


----- Original Message ----

> #9599: Allow prove to run tests in the perl debugger
> http://rt.cpan.org/Ticket/Display.html?id=9599
> 
> If memory serves I think Ovid was investigating. Did you reach any  
> conclusions?

Yes.  I came to the conclusion that it was very hard.  I'm sure it *can* be done, just not that it can be done easily.  

The first issue is that we kept failing with an "Unable to get terminal size" error.  The simplest hack was simply to add "COLUMNS=$columns LINES=$lines" environment variables.  That allowed the debugger to run.  See http://www.perlmonks.org/?node_id=639718 for more information.

That led us to the next problem whereby the test output was displayed immediately, but any information from the program that was sent to STDOUT or STDERR was buffered and dumped when the debugger exited.  This implies to me that we probably need some TAP::Parser::IO class to handle this better.  Then the @command we execute would look something like this:

  [
    'perl',
    '-d',
    '-MTAP::Parser::IO',
    '-Ilib',
    't/sample-tests/bignum'
  ]

So, if we solve the environment variable problem and then figure out TAP::Parser::IO and "prove -d" works.

It will still be problematic if the user tries to do this with more than one test script at a time, but I think that's an end-user problem.

Cheers,
Ovid 

--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Perl and CGI  - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog     - http://use.perl.org/~Ovid/journal/




More information about the tapx-dev mailing list