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

#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: 1.10.1.0 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`: https://github.com/creswick/cabal-dev/issues#issue/10 (Using cabal-install 0.10.2 built with Cabal 1.10.1.0) -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/824 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#824: cabal install --enable-tests does not install test dependencies. ---------------------------------+------------------------------------------ Reporter: creswick | Owner: ttuegel Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.10.1.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ---------------------------------+------------------------------------------ Changes (by tibbe): * cc: johan.tibell@… (added) * owner: => ttuegel -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/824#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#824: cabal install --enable-tests does not install test dependencies. ---------------------------------+------------------------------------------ Reporter: creswick | Owner: ttuegel Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.10.1.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ---------------------------------+------------------------------------------ Comment(by tibbe): Thomas, can you please take a look? -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/824#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#824: cabal install --enable-tests does not install test dependencies. ---------------------------------+------------------------------------------ Reporter: creswick | Owner: ttuegel Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.10.1.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ---------------------------------+------------------------------------------ Comment(by ttuegel): Replying to [comment:2 tibbe]:
Thomas, can you please take a look?
The attached patch should do the trick. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/824#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#824: cabal install --enable-tests does not install test dependencies. ---------------------------------+------------------------------------------ Reporter: creswick | Owner: ttuegel Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.10.1.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ---------------------------------+------------------------------------------ Comment(by tibbe): Looks good to me. Please send to Duncan for submit. Perhaps add a comment e.g. {{{ -- Make sure test suite dependencies are included. pkgSpecifiers' = map enableTests pkgSpecifiers ... }}} -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/824#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#824: cabal install --enable-tests does not install test dependencies.
---------------------------------+------------------------------------------
Reporter: creswick | Owner: ttuegel
Type: defect | Status: closed
Priority: normal | Milestone:
Component: cabal-install tool | Version: 1.10.1.0
Severity: normal | Resolution: fixed
Keywords: | Difficulty: unknown
Ghcversion: | Platform:
---------------------------------+------------------------------------------
Changes (by duncan):
* status: new => closed
* resolution: => fixed
Comment:
Applied.
{{{
Mon Apr 18 12:05:29 BST 2011 Thomas Tuegel

#824: cabal install --enable-tests does not install test dependencies. ---------------------------------+------------------------------------------ Reporter: creswick | Owner: ttuegel Type: defect | Status: closed Priority: normal | Milestone: Component: cabal-install tool | Version: 1.10.1.0 Severity: normal | Resolution: fixed Keywords: | Difficulty: unknown Ghcversion: | Platform: ---------------------------------+------------------------------------------ Comment(by elga): * [http://www.releve-identite-operateur.fr/rio-simyo.html simyo] -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/824#comment:6 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage