Cabal needs more tests

Johan Tibell johan.tibell at gmail.com
Fri Oct 26 17:37:54 CEST 2012


Hi all,

Regressions in Cabal are getting more common. Cabal have a tougher
correctness problem that your average Haskell program, as it

 * does a lot of I/O (e.g. calling out to other programs),
 * needs to do different things on different operating systems, and
 * includes rarely tested combinations of features (e.g. compiling a
TH module with profiling and shared libraries).

Manual testing is not an effective way to make sure that Cabal stays
bug free, as it's hard to remember all possible combinations that
ought to be tested and such manual testing isn't done after each
commit, making breakages go unnoticed for a long time.

I've been working on improving our test infrastructure by running a
build bot at:

    http://ci.johantibell.com/job/cabal/

That build bot only tests on Linux. I'm working on setting up a
Windows build bot, but progress has been slow.

Here's what I'm asking of you as Cabal contributors:

 * Have a look at the current build bot failures. Do you know how to
fix any of the failing tests?

 * When you write a new feature, try to include a test. Running tests
is as simple as

        cd Cabal && cabal configure --enable-tests && cabal build && cabal test

 * If you have some spare time, write a test for one of the existing
features (perhaps your own).

There are two test suites in the source repo, the package-tests suites
and the unit-tests suites. If possible, try to create unit tests
instead of package tests, as they are much faster to run and give
better error messages on failure.

Cheers,
Johan



More information about the cabal-devel mailing list