Bob Friesenhahn <bfrie...@simple.dallas.tx.us> writes:

> The numbers are useful.  TAP is documented to support reporting the number
> of tests at the end of the test run rather than at the beginning.

Yes, that of course works as well.  With the basic C TAP library, you can
use plan_lazy() instead of plan() and the library will then figure out the
number of tests for you.

> Using your TAP test driver, and under the umbrella of Automake, how does
> one re-execute just one test in order to see the details of how it
> failed?  The sample tests in your test harness expect that SOURCE and
> BUILD have already been set in the environment by Automake so just
> running via the suggested 'runtests -o' results in a failed test.

SOURCE and BUILD are only not set when you're building the C TAP Harness
source out of its distribution tarball, since that creates a generic
runtests binary.  When incorporating the test framework into another
package, you would do (from README):

        check_PROGRAMS = tests/runtests
        tests_runtests_CPPFLAGS = -DSOURCE='"$(abs_top_srcdir)/tests"' \
                -DBUILD='"$(abs_top_builddir)/tests"'

which will take care of defining SOURCE and BUILD, and then tests/runtests
-o <test> will work as expected.

-- 
Russ Allbery (r...@stanford.edu)             <http://www.eyrie.org/~eagle/>

Reply via email to