httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William McKee <>
Subject Re: Exiting a test script if a test fails
Date Thu, 26 Feb 2004 23:21:11 GMT
On Thu, Feb 26, 2004 at 01:17:08PM -0800, Stas Bekman wrote:
> >I tried to use it when I was messing with the pre- and post-test foo a 
> >while
> >back, but couldn't get it to work.  it might have had something to do with
> >the massive other changes I was trying to implement at the time, though...
> William will let us know.

It's not working. I placed the following lines before my die statement:

 undef $userdata;
 print STDOUT "Bail out! Unable to continue due to missing \$userdata"
   unless defined $userdata && ref $userdata eq 'HASH';

The die statement gets called.

> >if we can get it to work, I'd be in favor of an Apache::Test::bail()
> >function (or whatever you want to call it).
> It's an ambiguous name since it doesn't tell you that it'll bail out from 
> the whole test suite and one may think that it'll abort only the current 
> test. How about:
>   Apache::Test::abort_all_tests()
> or a similar, more explicit name? Suggestions are welcome of course.

The name doesn't matter to me as long as the functionality is present
(which may be outside the realm of possibility at the moment). Just for
another idea, I started looking for this ability in the Helper
Functions. A function like t_abort_all_tests("Reason goes here") would
make sense to me.

For the time being, I'll stick with either the die or the skip. Thanks
for you reponses.


Knowmad Services Inc.

View raw message