chromatic wrote:
On Monday 14 January 2008 15:42:49 Adam Kennedy wrote:

Test::Builder should just do what it's told.

If the code that IS responsible for testing suites tells it to bail on
fail, that's exactly what it should do.

Let me rephrase this in an amusing way which demonstrates how silly this idea is.

We have a program which runs suites of tests. It does this by spawning new processes which produce TAP somehow. Some of those processes produce TAP by using Perl modules which eventually use Test::Builder. Some do not. They don't have to, because there's a separation between producing TAP and consuming TAP, by design.

This is why we have a program which runs suites of tests.

Now some people say "If anything which generates TAP generates a TAP failure, I don't want to run the rest of the test suite." They have plenty of potential reasons, and those reasons are reasonable reasons.

We do have a program which runs suites of tests. Actually, we can have several, because one of the goals of writing TAP::Parser which is now much of the guts of Test::Harness 3.0 is to allow people to write programs which run suites of TAP producers and consume and aggregate the resulting TAP. The point is customized behavior.

That's a digression though, because as I understand it the goal of putting this OH NOES SOMETHING FALLDED!!! logic in Test::Builder is so that the currently running test file (necessarily Perl, necessarily using Test::Builder, so see the caveats about neither necessarily being true for TAP generators) can stop running when it encounters a failure.

Of course, that won't stop a whole test suite from continuing to run. Dot dot dot.

I'm confused here, but that's probably because I'm not intimate with T::B and T::H:

  =item B<BAIL_OUT>

      $Test->BAIL_OUT($reason);

  Indicates to the Test::Harness that things are going so badly all
  testing should terminate.  This includes running any additional test
  scripts.

this is what I'm trying to to - generate TAP that communicates with TAP consumer something along the lines of "yikes, stop what you are doing as soon as you can." the patch I submitted to Test::Builder just calls BAIL_OUT() at $time.

I think this is a legitimate thing to communicate between the TAP producer and TAP consumer, even across disparate languages (which I'm in the middle of regularly :)

is this not reasonable?

--Geoff

Reply via email to