diff options
author | Alp Mestanogullari <alpmestan@gmail.com> | 2019-02-01 18:52:27 +0100 |
---|---|---|
committer | Alp Mestanogullari <alpmestan@gmail.com> | 2019-02-01 18:52:27 +0100 |
commit | 33663fe2db68e31f1a61fbb4c613751a26b1ee1e (patch) | |
tree | ea18ace22f33b2df634b1c0ea30b86e9533b2a8f | |
parent | 587e8103d17b65334e9c2b289596d7341e15f8dc (diff) | |
download | haskell-wip/alp/hadrian-validate.tar.gz |
-rw-r--r-- | hadrian/src/Rules/Test.hs | 7 | ||||
-rw-r--r-- | hadrian/src/Settings/Builders/RunTest.hs | 9 |
2 files changed, 12 insertions, 4 deletions
diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs index f7d8d5edc9..870e61598c 100644 --- a/hadrian/src/Rules/Test.hs +++ b/hadrian/src/Rules/Test.hs @@ -47,9 +47,9 @@ testRules = do root -/- timeoutPath ~> timeoutProgBuilder "test" ~> do - -- needTestBuilders -- TODO : Should we remove the previosly generated config file? + needTestBuilders -- Prepare Ghc configuration file for input compiler. need [root -/- ghcConfigPath, root -/- timeoutPath] @@ -66,6 +66,10 @@ testRules = do makePath <- builderPath $ Make "" top <- topDirectory ghcFlags <- runTestGhcFlags + let ghciFlags = ghcFlags ++ unwords + [ "--interactive", "-v0", "-ignore-dot-ghci" + , "-fno-ghci-history" + ] -- where to get those from? checkPprPath <- needFile Stage0 checkPpr @@ -79,6 +83,7 @@ testRules = do setEnv "PYTHON" pythonPath setEnv "TEST_HC" ghcPath setEnv "TEST_HC_OPTS" ghcFlags + setEnv "TEST_HC_OPTS_INTERACTIVE" ghciFlags setEnv "CHECK_PPR" (top </> checkPprPath) setEnv "CHECK_API_ANNOTATIONS" (top </> annotationsPath) diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs index 05b6555170..08623590e4 100644 --- a/hadrian/src/Settings/Builders/RunTest.hs +++ b/hadrian/src/Settings/Builders/RunTest.hs @@ -38,13 +38,15 @@ runTestGhcFlags = do -- Take flags to send to the Haskell compiler from test.mk. -- See: https://github.com/ghc/ghc/blob/master/testsuite/mk/test.mk#L37 unwords <$> sequence - [ pure " -dcore-lint -dcmm-lint -no-user-package-db -rtsopts" + [ pure "-dcore-lint -dstg-lint -dcmm-lint" + , pure "-no-user-package-db -rtsopts" , pure ghcOpts , pure ghcExtraFlags , ifMinGhcVer "711" "-fno-warn-missed-specialisations" , ifMinGhcVer "711" "-fshow-warning-groups" , ifMinGhcVer "801" "-fdiagnostics-color=never" , ifMinGhcVer "801" "-fno-diagnostics-show-caret" + , pure "-Werror=compat" , pure "-dno-debug-output" ] @@ -93,8 +95,9 @@ runTestBuilderArgs = builder RunTest ? do , pure ["--rootdir=" ++ test | test <- libTests] , arg "-e", arg $ "windows=" ++ show windows , arg "-e", arg $ "darwin=" ++ show darwin - , arg "-e", arg $ "config.local=" ++ - show (elem testGhc ["stage1", "stage2"]) + , arg "-e", arg $ "config.local=False" + , arg "-e", arg $ "config.exeext=" ++ + show (if windows then "exe" else "") , arg "-e", arg $ "config.cleanup=False" -- Don't clean up for now. , arg "-e", arg $ "config.compiler_debugged=" ++ quote (yesNo debugged) , arg "-e", arg $ "ghc_debugged=" ++ quote (yesNo debugged) |