[Haskell-cafe] Re: GSoC: Improving Cabal's Test Support

Thomas Tuegel ttuegel at gmail.com
Wed Apr 28 10:42:16 EDT 2010


On Wed, Apr 28, 2010 at 4:54 AM, Duncan Coutts
<duncan.coutts at googlemail.com> wrote:
> On 28 April 2010 09:24, Richard G. <richardg at richardg.name> wrote:
>> I think that formatted plain-text output would be much better than XML,
>> something that is human-readable and relatively easy to parse via machine.
>>  Something similar to the GHC error output would work well because
>> developers are familiar with it.
>
> I have previously advocated a library interface as a detailed
> testsuite interface (in addition to a lowest common denominator
> interface of stdio+exitcode). That is a test stanza in a package
> .cabal file would specify a module containing an entry point of the
> right type (like main but using a more interesting type).
>
> That way, cabal or any other tool could run the testsuite and produce
> results in whatever format it likes.

I appreciate the elegance of this method, but it seems to me that it
requires dynamic loading, which is currently in a sorry state.  One
way or another, cabal will need to provide a data structure it expects
test suites to use for results.  Is there a substantial advantage to a
library interface, versus providing Read/Show instances for the test
result data structure?

> As you suggest in your other post, it would make sense to adapt
> test-framework to implement the interface specified by Cabal.

I agree, as well; this is essentially the approach I took in my proposal.

-- 
Thomas Tuegel


More information about the Haskell-Cafe mailing list