Commit 4b50b01e authored by ttuegel's avatar ttuegel
Browse files

Fixes for running test suite with HPC.

parent 04194288
......@@ -131,6 +131,19 @@ Library
test-suite unit-tests
type: exitcode-stdio-1.0
main-is: suite.hs
other-modules: PackageTests.BuildDeps.GlobalBuildDepsNotAdditive1.Check,
PackageTests.BuildDeps.GlobalBuildDepsNotAdditive2.Check,
PackageTests.BuildDeps.InternalLibrary0.Check,
PackageTests.BuildDeps.InternalLibrary1.Check,
PackageTests.BuildDeps.InternalLibrary2.Check,
PackageTests.BuildDeps.InternalLibrary3.Check,
PackageTests.BuildDeps.InternalLibrary4.Check,
PackageTests.BuildDeps.TargetSpecificDeps1.Check,
PackageTests.BuildDeps.TargetSpecificDeps2.Check,
PackageTests.BuildDeps.TargetSpecificDeps3.Check,
PackageTests.BuildDeps.SameDepsAllRound.Check,
PackageTests.TestStanza.Check,
PackageTests.PackageTester
hs-source-dirs: tests
build-depends:
base,
......
......@@ -105,8 +105,16 @@ cabal_install spec = do
-- | Returns the command that was issued, the return code, and hte output text
cabal :: PackageSpec -> [String] -> IO (String, ExitCode, String)
cabal spec cabalArgs =
run (Just $ directory spec) "runghc" (["Setup.hs"] ++ cabalArgs)
cabal spec cabalArgs = do
wd <- getCurrentDirectory
r <- run (Just $ directory spec) "ghc"
[ "--make"
, "-fhpc"
, "-package-conf " ++ wd </> "../dist/package.conf.inplace"
, "Setup.hs"
]
requireSuccess r
run (Just $ directory spec) (wd </> directory spec </> "Setup") cabalArgs
-- | Returns the command that was issued, the return code, and hte output text
run :: Maybe FilePath -> String -> [String] -> IO (String, ExitCode, String)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment