[Hackage] #824: cabal install --enable-tests does not install test dependencies.

Hackage cvs-ghc at haskell.org
Mon Mar 28 22:18:19 CEST 2011

#824: cabal install --enable-tests does not install test dependencies.
  Reporter:  creswick            |        Owner:          
      Type:  defect              |       Status:  new     
  Priority:  normal              |    Milestone:          
 Component:  cabal-install tool  |      Version:
  Severity:  normal              |     Keywords:          
Difficulty:  unknown             |   Ghcversion:          
  Platform:                      |  
 Cabal install normally installs all the necessary project dependencies;
 however, this is not happening for the dependencies specified in the Test-
 suite stanzas.  Here's an example cabal file:

 Name:           foo
 Version:        1.0
 License:        BSD3
 Cabal-Version:  >= 1.9.2
 Build-Type:     Simple

 executable foo
     main-is: foo.hs
     build-depends: base
                  , xml == 1.3.7

 Test-Suite test-foo
     type:       exitcode-stdio-1.0
     main-is:    test-foo.hs
     build-depends: base
                   , QuickCheck >= 2.0

 `cabal install` will install xml if necessary, then build foo, but `cabal
 install --enable-tests` complains that QuickCheck is not available:

  $ cabal install --enable-tests
 Resolving dependencies...
 Configuring foo-1.0...
 cabal: At least the following dependencies are missing:
 QuickCheck >=2.0
 cabal: Error: some packages failed to install:
 foo-1.0 failed during the configure step. The exception was:
 ExitFailure 1

 This causes some problems when building tests with `cabal-dev`:


 (Using cabal-install 0.10.2 built with Cabal

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/824>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list