[commit: ghc] wip/alp/hadrian-validate: wip (33663fe)

git at git.haskell.org git at git.haskell.org
Sat Feb 2 09:00:18 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/alp/hadrian-validate
Link       : http://ghc.haskell.org/trac/ghc/changeset/33663fe2db68e31f1a61fbb4c613751a26b1ee1e/ghc

>---------------------------------------------------------------

commit 33663fe2db68e31f1a61fbb4c613751a26b1ee1e
Author: Alp Mestanogullari <alpmestan at gmail.com>
Date:   Fri Feb 1 18:52:27 2019 +0100

    wip


>---------------------------------------------------------------

33663fe2db68e31f1a61fbb4c613751a26b1ee1e
 hadrian/src/Rules/Test.hs                | 7 ++++++-
 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 f7d8d5e..870e615 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 05b6555..0862359 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)



More information about the ghc-commits mailing list