incubator-lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <mar...@rectangular.com>
Subject [lucy-dev] C TAP test harnesses
Date Fri, 13 May 2011 04:33:06 GMT
On Thu, May 12, 2011 at 05:24:14PM -0700, Joe Schaefer wrote:
> >   * Port most test files  within trunk/perl/t/ to C.
> 
> If we're in need of a test framework for C I wrote a small TAP-compliant
> test framework for apreq here:
> 
> http://svn.apache.org/repos/asf/httpd/apreq/trunk/library/t/

Great minds think alike.  We have two of those. :)

    http://svn.apache.org/repos/asf/incubator/lucy/trunk/core/Lucy/Test.cfh
    http://svn.apache.org/repos/asf/incubator/lucy/trunk/core/Lucy/Test.c

    http://svn.apache.org/repos/asf/incubator/lucy/trunk/charmonizer/src/Charmonizer/Test.h
    http://svn.apache.org/repos/asf/incubator/lucy/trunk/charmonizer/src/Charmonizer/Test.c

(And another Lucy community member, David Wheeler, authored a JavaScript port
of Test.Simple a few years ago.)

An additional related project of note is APR's test harness, which isn't TAP.

    http://svn.apache.org/repos/asf/apr/apr/trunk/test/abts.h
    http://svn.apache.org/repos/asf/apr/apr/trunk/test/abts.c

Aside from TAP/no-TAP, these test harness libraries are distinguished by their
dependencies.

    ==================================================================
    | Test harness   |  TAP  |  Dependencies                         |
    ------------------------------------------------------------------
    | APR            |  no   | none                                  |
    | apreq          |  yes  | APR                                   |
    | Charmonizer    |  yes  | none                                  |
    | Lucy/Clownfish |  yes  | C99/C++, Charmonizer, Clownfish       |
    ==================================================================

The Lucy/Clownfish test harness is a fork of the one written for
Charmonizer[1].  We have a lot of tests for Lucy, and we're going to
accumulate a lot more over time.  It makes sense to have a C99,
Clownfish-friendly test harness we can customize at will -- so this one, IMO,
we ought to keep.

In contrast, now that Lucy no longer uses the Charmonizer test harness, it's
become less important to us and it would be kind of nice to consolidate it
away.  The apreq harness isn't a good replacement candidate in its present
form, though, because it requires APR.  That leaves the APR test harness.
It's not TAP, though.  I like TAP.  I'm not motivated to do a bunch of work
refactoring something that's TAP and working already.

For the record, there are also all of these out there in the world:

    http://testanything.org/wiki/index.php/TAP_Producers#C_.2F_C.2B.2B

It seems like the ASF could use a decent standalone C TAP library with an
official public API, C89, cross-platform-compatible and with no dependencies.

Marvin Humphrey

[1] Charmonizer is a C configuration prober, like Autoconf and Metaconfig, but
    written in C and Windows-compatible.  See Lucy::Docs::DevGuide for an
    overview of Lucy's layers:
    https://svn.apache.org/repos/asf/incubator/lucy/trunk/core/Lucy/Docs/DevGuide.cfh


Mime
View raw message