Generate ghc package.cache before running spec
This commit is contained in:
parent
130ec43ad5
commit
0206085662
@ -8,5 +8,10 @@ main = do
|
||||
let sandboxes = [ "test/data", "test/data/check-packageid" ]
|
||||
genSandboxCfg dir = withDirectory dir $ \cwd -> do
|
||||
system ("sed 's|@CWD@|" ++ cwd ++ "|g' cabal.sandbox.config.in > cabal.sandbox.config")
|
||||
genSandboxCfg `mapM` sandboxes
|
||||
pkgDirs =
|
||||
[ "test/data/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d"
|
||||
, "test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d"]
|
||||
genGhcPkgCache dir = system $ "ghc-pkg recache --force -f" ++ dir
|
||||
genSandboxCfg `mapM_` sandboxes
|
||||
genGhcPkgCache `mapM_` pkgDirs
|
||||
hspec spec
|
||||
|
Loading…
Reference in New Issue
Block a user