Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Commit

Permalink
Address some issues with the testsuite rules (#672)
Browse files Browse the repository at this point in the history
The driver was invoked with invalid syntax for some arguments, we were not
making sure hsc2hs is built before we run the tests (it's needed by many), etc.
  • Loading branch information
alpmestan authored and snowleopard committed Sep 3, 2018
1 parent abf9cbe commit 4819617
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/Rules/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ testRules = do
-- | Using program shipped with testsuite to generate ghcconfig file.
root -/- ghcConfigProgPath ~> do
ghc <- builderPath $ Ghc CompileHs Stage0
createDirectory $ takeDirectory (root -/- ghcConfigProgPath)
cmd ghc [ghcConfigHsPath, "-o" , root -/- ghcConfigProgPath]

-- | TODO : Use input test compiler and not just stage2 compiler.
Expand Down
14 changes: 7 additions & 7 deletions src/Settings/Builders/RunTest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,18 @@ runTestBuilderArgs = builder RunTest ? do
, arg "-e", arg $ "config.cleanup=False" -- Don't clean up.
, arg "-e", arg $ "config.compiler_debugged=" ++ quote (yesNo debugged)
, arg "-e", arg $ "ghc_debugged=" ++ quote (yesNo debugged)
, arg "-e", arg $ asZeroOne "ghc_with_native_codegen" withNativeCodeGen
, arg "-e", arg $ asZeroOne "ghc_with_native_codegen=" withNativeCodeGen

, arg "-e", arg $ "config.have_interp=" ++ show withInterpreter
, arg "-e", arg $ "config.unregisterised=" ++ show unregisterised

, arg "-e", arg $ "ghc_compiler_always_flags=" ++ quote ghcFlags
, arg "-e", arg $ asZeroOne "ghc_with_dynamic_rts" (hasRtsWay "dyn")
, arg "-e", arg $ asZeroOne "ghc_with_threaded_rts" (hasRtsWay "thr")
, arg "-e", arg $ asZeroOne "config.have_vanilla" (hasLibWay vanilla)
, arg "-e", arg $ asZeroOne "config.have_dynamic" (hasLibWay dynamic)
, arg "-e", arg $ asZeroOne "config.have_profiling" (hasLibWay profiling)
, arg "-e", arg $ asZeroOne "ghc_with_smp" withSMP
, arg "-e", arg $ asZeroOne "ghc_with_dynamic_rts=" (hasRtsWay "dyn")
, arg "-e", arg $ asZeroOne "ghc_with_threaded_rts=" (hasRtsWay "thr")
, arg "-e", arg $ asZeroOne "config.have_vanilla=" (hasLibWay vanilla)
, arg "-e", arg $ asZeroOne "config.have_dynamic=" (hasLibWay dynamic)
, arg "-e", arg $ asZeroOne "config.have_profiling=" (hasLibWay profiling)
, arg "-e", arg $ asZeroOne "ghc_with_smp=" withSMP
, arg "-e", arg $ "ghc_with_llvm=0" -- TODO: support LLVM

, arg "-e", arg $ "config.ghc_dynamic_by_default=" ++ show hasDynamicByDefault
Expand Down
1 change: 1 addition & 0 deletions src/Settings/Default.hs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ testsuitePackages = do
, ghci
, ghcPkg
, hp2ps
, hsc2hs
, iserv
, parallel
, runGhc ] ++
Expand Down

0 comments on commit 4819617

Please sign in to comment.