New test-suite functionality
ttuegel at gmail.com
Fri Nov 26 19:10:21 EST 2010
On Thu, Nov 25, 2010 at 11:07 PM, Antoine Latter <aslatter at gmail.com> wrote:
> Hi Cabal,
> Is there documentation for the new test-suite functionality? I tried
> adding the following stanza to my package description:
> test-suite basic
> default-language: Haskell2010
> type: exitcode-stdio-1.0
> main-is: Basic.hs
> hs-source-dirs: tests
> Running 'cabal test' only yields :
> Running 0 test suites...
> 0 of 0 test suites (0 of 0 test cases) passed.
> Am I doing something wrong? It would be nice if I got an error
> message. It doesn't seem to matter at all what I fill in to the stanza
> for the main-is and hs-source-dirs fields.
Are you configuring/building the package with the commands 'cabal
configure --enable-tests' and 'cabal build' before trying to run
tests? I suspect the problem you are encountering is that the default
option for 'configure' is '--disable-tests'. I apologize for the
confusion; this is documented in the Cabal User's Guide, but obviously
the documentation I wrote needs improvement :)
This case also indicates to me that we need to add a gentle reminder
about 'cabal configure --enable-tests' whenever 'cabal test' is
invoked, but no test suites are found.
More information about the cabal-devel