Running the Cabal tests

Erik de Castro Lopo mle+hs at mega-nerd.com
Sun Mar 20 03:37:54 UTC 2016


Edward Z. Yang wrote:

> Actually, the package test suite doesn't have to make this assumption
> (it just does so by default).  If you add CABAL_PACKAGETESTS_WITH_GHC
> you can specify a version of GHC to do the tests with, distinct from
> the GHC version Cabal was built with.  (It works best if the GHC
> versions match, however, because if you build Cabal with ghc-7.10 and
> then run the test suite with ghc-7.8 none of the tests which assume
> there is a Cabal library available for ghc-7.8 will work.)

Ok, that gets me closer. I now get three package-test failing (out of
60):

  GhcPkgGuess/Symlink:                 FAIL
     expected: is version 9999999
     in output: Configuring SameDirectory-0.1.0.0...
    Setup: Cannot find the program 'ghc'. User-specified path
    '/home/erikd/Git/Haskell/cabal-erikd/Cabal-1.25.0.0/tests/PackageTests/GhcPkgGuess/Symlink/./ghc'
    does not refer to an executable and the program is not on the system path.
  GhcPkgGuess/SymlinkVersion:          FAIL
     expected: is version 9999999
     in output: Configuring SameDirectory-0.1.0.0...
    Setup: Cannot find the program 'ghc'. User-specified path
    '/home/erikd/Git/Haskell/cabal-erikd/Cabal-1.25.0.0/tests/PackageTests/GhcPkgGuess/SymlinkVersion/./ghc'
    does not refer to an executable and the program is not on the system path.
  GhcPkgGuess/SymlinkGhcVersion:       FAIL
     expected: is version 9999999
     in output: Configuring SameDirectory-0.1.0.0...
    Setup: Cannot find the program 'ghc'. User-specified path
    '/home/erikd/Git/Haskell/cabal-erikd/Cabal-1.25.0.0/tests/PackageTests/GhcPkgGuess/SymlinkGhcVersion/./ghc'
    does not refer to an executable and the program is not on the system path.

These test don't fail when I'm building with ghc-7.10 (which was also used to
build GHC). Should these tests fail like that?

Maybe I should build cabal twice, once with ghc-7.8 to make sure it builds
and once with ghc-7.10 where I can run the tests as well.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the cabal-devel mailing list