[bug] Test suite peiling up?

Thomas Tuegel ttuegel at gmail.com
Tue Jun 14 22:47:41 CEST 2011


On Mon, Jun 13, 2011 at 1:35 PM, Bram Neijt <bneijt at gmail.com> wrote:
> Dear List,
>
> I'm new to haskell and the first thing I want to get working is test,
> to enable me to explore the language through righting tests.
>
> I've tried to use cabal to run tests, but found very little
> documentation. In the end, I found the test-suite feature of cabal >=
> 1.9.2, which I have set up as best I can in the attachment.
>
> If I run :
> cabal configure --enable-tests; cabal test
>
> multiple times, I will get more and more output, as if it is adding
> tests to a list even though the tests are already there.
>
> To reproduce:
> - Extract the attached archive of code
> - Enter the source directoy
> - Run cabal configure --enable-tests; cabal test
>  multiple times
>
> Expected result: Only one test is executed every time I run cabal test.
> Actual result: it adds the same test to a list every time.

Hello! I'm the author of the Cabal test code. This is a known issue; I
have submitted a patch that should appear in the next version of
Cabal.

Note that Cabal is not actually running your test multiple times,
rather, the problem is that the test log files are not overwritten
between invocations of 'cabal test'. Until the fixed version of Cabal
is released, you can run 'cabal clean' before 'cabal configure' to
delete the test logs between 'cabal test' invocations and clean up the
spurious output.

Thanks!

-- 
Thomas Tuegel



More information about the cabal-devel mailing list