summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-10-31 13:54:58 -0400
committerBen Gamari <ben@smart-cactus.org>2019-10-31 13:56:39 -0400
commit70b65bfe40db09617c1490d9453858f018006a9e (patch)
tree4d0bf6d913b0c8d55a95e422a1c86854d0db2e18
parent4898df1cc25132dc9e2599d4fa4e1bbc9423cda5 (diff)
downloadhaskell-wip/hadrian-runtest-fixes.tar.gz
hadrian: Make runtest invocation consistency with Makewip/hadrian-runtest-fixes
Use True/False instead of 0/1. This shouldn't be a functional change but we should be consistent.
-rw-r--r--hadrian/src/Settings/Builders/RunTest.hs17
1 files changed, 9 insertions, 8 deletions
diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs
index 4b4d815a2c..6e07d1407a 100644
--- a/hadrian/src/Settings/Builders/RunTest.hs
+++ b/hadrian/src/Settings/Builders/RunTest.hs
@@ -94,7 +94,8 @@ runTestBuilderArgs = builder RunTest ? do
-- See #16087
let ghcBuiltByLlvm = False -- TODO: Implement this check
- let asZeroOne s b = s ++ zeroOne b
+ let asBool :: String -> Bool -> String
+ asBool s b = s ++ show b
-- TODO: set CABAL_MINIMAL_BUILD/CABAL_PLUGIN_BUILD
mconcat [ arg $ "testsuite/driver/runtests.py"
@@ -109,18 +110,18 @@ runTestBuilderArgs = builder RunTest ? do
, arg "-e", arg $ "config.exeext=" ++ quote exe
, arg "-e", arg $ "config.compiler_debugged=" ++
show debugged
- , arg "-e", arg $ asZeroOne "ghc_with_native_codegen=" withNativeCodeGen
+ , arg "-e", arg $ asBool "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 $ asBool "ghc_with_dynamic_rts=" (hasRtsWay "dyn")
+ , arg "-e", arg $ asBool "ghc_with_threaded_rts=" (hasRtsWay "thr")
+ , arg "-e", arg $ asBool "config.have_vanilla=" (hasLibWay vanilla)
+ , arg "-e", arg $ asBool "config.have_dynamic=" (hasLibWay dynamic)
+ , arg "-e", arg $ asBool "config.have_profiling=" (hasLibWay profiling)
+ , arg "-e", arg $ asBool "ghc_with_smp=" withSMP
, arg "-e", arg $ "ghc_with_llvm=0" -- TODO: support LLVM
, arg "-e", arg $ "config.ghc_dynamic_by_default=" ++ show hasDynamicByDefault