From 0206085662c58ae37e750ad0b8cc4b0f83003505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gr=C3=B6ber?= Date: Wed, 23 Apr 2014 04:08:54 +0200 Subject: [PATCH] Generate ghc package.cache before running spec --- test/Main.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/Main.hs b/test/Main.hs index 859ffd9..dbec67a 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -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