diff options
author | Alp Mestanogullari <alpmestan@gmail.com> | 2019-04-23 14:46:42 +0200 |
---|---|---|
committer | Alp Mestanogullari <alp@well-typed.com> | 2019-05-06 17:32:56 -0400 |
commit | ba0aed2e783435c9175761fc2b20b9302f368a98 (patch) | |
tree | 3a3fd1b976c8ec4535b97b15f71b8ddc64415c5d /hadrian | |
parent | e172a6d127a65b945b31306ff7b6c43320debfb4 (diff) | |
download | haskell-ba0aed2e783435c9175761fc2b20b9302f368a98.tar.gz |
Hadrian: override $(ghc-config-mk), to prevent redundant config generation
This required making the 'ghc-config-mk' variable overridable in
testsuite/mk/boilerplate.mk, and then making use of this in hadrian
to point to '<build root>/test/ghcconfig' instead, which is where we
always put the test config.
Previously, we would build ghc-config and run it against the
GHC to be tested, a second time, while we're running the tests, because some
include testsuite/mk/boilerplate.mk. This was causing unexpected output
failures.
Diffstat (limited to 'hadrian')
-rw-r--r-- | hadrian/src/Rules/Test.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs index f7e5c45051..6a010df45a 100644 --- a/hadrian/src/Rules/Test.hs +++ b/hadrian/src/Rules/Test.hs @@ -107,6 +107,9 @@ testRules = do -- Shake can keep track of them, but it is not as easy as it seems -- to get that to work. liftIO $ do + -- Many of those env vars are used by Makefiles in the + -- test infrastructure, or from tests or their + -- Makefiles. setEnv "MAKE" makePath setEnv "PYTHON" pythonPath setEnv "TEST_HC" ghcPath @@ -116,6 +119,11 @@ testRules = do setEnv "CHECK_API_ANNOTATIONS" (top -/- root -/- checkApiAnnotationsProgPath) + -- This lets us bypass the need to generate a config + -- through Make, which happens in testsuite/mk/boilerplate.mk + -- which is in turn included by all test 'Makefile's. + setEnv "ghc-config-mk" (top -/- root -/- ghcConfigPath) + -- Execute the test target. -- We override the verbosity setting to make sure the user can see -- the test output: https://gitlab.haskell.org/ghc/ghc/issues/15951. |