logo       

Re: Test::Builder feature request...: msg#00084

Subject: Re: Test::Builder feature request...
Randy W. Sims wrote:
Adam Kennedy wrote:


Randy W. Sims wrote:
Adam Kennedy wrote:

This works:


---test.pl---
use Test::More tests => 1;

my $Test = Test::More->builder;
my $counter = $Test->current_test;

print qx!perl t/response.pl!;

$Test->current_test($counter + 1);

But why 1? Why not 5? or 10?

It has to be set to the number of tests run in the other process. I don't know if there is a way to do something like no_plan for the sub process... I don't think so... Every time pass(), ok(), etc is called it updates the counter. In the sub process there is no way to pass back the internal counter, so you have to update the counter manually.

Well, that would be why you allow the sub-process's plan code to run as normal. When you get the fragment back, you can update it from the header or the foot, but not print the actual header/footer.

You mean capture the output from the child process? Then allow the parent to generate the test output from the captured & parsed output of the child? That would mean for any lengthy child process there would be a pause until the child completed; only then would the parent output the results from the child. Otherwise, I guess you could Tee the output from the child.

Is that what you mean by getting the fragment back?

Well, what I had actually intended originally for my implementation was that you would split off the server process and have STDOUT/ERROR writing to a known file.

Then either explicitly or at END time, the main script would collect up the files for however many async things it had spawned off, and attach them to the end.

So rather than having the tests intermingling down the test output, they'd be in a seperate block at the end.

But then in doing that I was trying for the most simple approach I could think of.

So by getting the fragment back I'd been thinking more in terms of loading the fragments after the forked server was finished.

Adam K



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe