[Hackage] #693: Missing instructions for running Cabal's testsuite

#693: Missing instructions for running Cabal's testsuite ----------------------------+----------------------------------------------- Reporter: tibbe | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- It's not quite clear to me how to get `tests/suite.cabal` to build using an in-place build of Cabal. I played around with passing `--package-db ../dist/package.conf.inplace` to `configure` when configuring `tests/suite.cabal` without success. A `tests/README` file would be very useful. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/693 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#693: Missing instructions for running Cabal's testsuite ----------------------------+----------------------------------------------- Reporter: tibbe | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by ttuegel): Replying to [ticket:693 tibbe]:
It's not quite clear to me how to get `tests/suite.cabal` to build using an in-place build of Cabal. I played around with passing `--package-db ../dist/package.conf.inplace` to `configure` when configuring `tests/suite.cabal` without success.
A `tests/README` file would be very useful.
I will indicate here how to get the testsuite to run against a version of Cabal other than the system version, but it will be immediately obvious that this is a workaround only, and not a permanent solution. The problem is that QuickCheck is needed for the testsuite, and QuickCheck depends on GHC, which depends on the system Cabal, so the system Cabal always gets pulled in. The solution is to patch QuickCheck so it does not depend on GHC. Use the attached patch to do that: cabal unpack QuickCheck-2.1.0.3 cd QuickCheck-2.1.0.3 patch -p1 < ../QuickCheck-2.1.0.3-no-GHC_INTERRUPT.patch cabal install Now you will need to rebuild test-framework-quickcheck2 to use the patched version of QuickCheck. I had to also rebuild test-framework and test- framework-hunit. I haven't tried to test a version of Cabal in-place, but these steps should at least get you to a point where you can test a version other than the version from GHC. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/693#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#693: Missing instructions for running Cabal's testsuite ----------------------------+----------------------------------------------- Reporter: tibbe | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by duncan): I would welcome a tests/README file. The following works for me: {{{ cd cabal/ cabal configure -O0 && cabal build cd tests/ cabal configure -O0 --package-db=../dist/package.conf.inplace cabal build ./dist/build/suite/suite }}} Due to the problem with QC, the configure step for the testsuite will warn about the fact that it's pulling in two versions of the Cabal library. Using the attached QC patch would be another solution. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/693#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#693: Missing instructions for running Cabal's testsuite ----------------------------+----------------------------------------------- Reporter: tibbe | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by duncan): Replying to [comment:2 duncan]:
I would welcome a tests/README file.
The following works for me:
Note, it actually needs: {{{ cabal configure -O0 --package-db=../dist/package.conf.inplace --constraint='Cabal == 1.9.1' }}} (or whatever the development version of Cabal is) to force it to use the latest version, otherwise it picks the older version since that version would be consistent with the version that the ghc package depends on. Cabal always tries to use consistent deps, but without the patched QC, we're trying to force it to pick inconsistent ones (since WC depends on the the ghc package which depends on an older Cabal lib). -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/693#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#693: Missing instructions for running Cabal's testsuite ----------------------------+----------------------------------------------- Reporter: tibbe | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by tibbe): The attached ticket adds an intial README file. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/693#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#693: Missing instructions for running Cabal's testsuite
----------------------------+-----------------------------------------------
Reporter: tibbe | Owner:
Type: defect | Status: closed
Priority: normal | Milestone:
Component: Cabal library | Version: HEAD
Severity: normal | Resolution: fixed
Keywords: | Difficulty: unknown
Ghcversion: | Platform:
----------------------------+-----------------------------------------------
Changes (by duncan):
* status: new => closed
* resolution: => fixed
Comment:
{{{
Thu May 27 22:27:01 BST 2010 Johan Tibell

#693: Missing instructions for running Cabal's testsuite ----------------------------+----------------------------------------------- Reporter: tibbe | Owner: Type: defect | Status: closed Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Resolution: fixed Keywords: | Difficulty: unknown Ghcversion: | Platform: ----------------------------+----------------------------------------------- Comment(by ttuegel): Actually, I don't think you can test an in-place version of Cabal this way. Yes, the main testsuite program will be compiled against the new version of Cabal, but some (most?) of the tests compile and run their own Setup.hs files, which will pick up the _installed_ version of Cabal instead of the version you _think_ you are testing. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/693#comment:6 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#693: Missing instructions for running Cabal's testsuite ----------------------------+----------------------------------------------- Reporter: tibbe | Owner: Type: defect | Status: reopened Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Resolution: Keywords: | Difficulty: unknown Ghcversion: | Platform: ----------------------------+----------------------------------------------- Changes (by duncan): * status: closed => reopened * resolution: fixed => Comment: Replying to [comment:6 ttuegel]:
Actually, I don't think you can test an in-place version of Cabal this way. Yes, the main testsuite program will be compiled against the new version of Cabal, but some (most?) of the tests compile and run their own Setup.hs files, which will pick up the _installed_ version of Cabal instead of the version you _think_ you are testing.
You're quite right. We would have to extend the tests to take the inplace package db as a parameter. It's probably not worth it. The README should just recommend to register the Cabal package under test. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/693#comment:7 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#693: Missing instructions for running Cabal's testsuite
----------------------------+-----------------------------------------------
Reporter: tibbe | Owner:
Type: defect | Status: reopened
Priority: normal | Milestone:
Component: Cabal library | Version: HEAD
Severity: normal | Resolution:
Keywords: | Difficulty: unknown
Ghcversion: | Platform:
----------------------------+-----------------------------------------------
Comment(by tibbe):
Attached a patch that tells the user to register the version of Cabal
under test before building and running the test suite.
{{{
Mon May 31 22:09:03 CEST 2010 Johan Tibell

#693: Missing instructions for running Cabal's testsuite ----------------------------+----------------------------------------------- Reporter: tibbe | Owner: Type: defect | Status: reopened Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Resolution: Keywords: | Difficulty: unknown Ghcversion: | Platform: ----------------------------+----------------------------------------------- Changes (by PHO): * cc: pho@… (added) -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/693#comment:9 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#693: Missing instructions for running Cabal's testsuite ----------------------------+----------------------------------------------- Reporter: tibbe | Owner: Type: defect | Status: reopened Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Resolution: Keywords: | Difficulty: unknown Ghcversion: | Platform: ----------------------------+----------------------------------------------- Comment(by elga): * [http://www.releve-identite-operateur.fr/numbero-de-virgin-mobile.html virgin mobile] -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/693#comment:10 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage