diff options
author | Andreas Klebinger <klebinger.andreas@gmx.at> | 2019-10-22 09:19:28 +0200 |
---|---|---|
committer | Andreas Klebinger <klebinger.andreas@gmx.at> | 2019-10-22 15:24:05 +0200 |
commit | 5682f18b58bf56221e55d2fac3e73a608495cab4 (patch) | |
tree | ed48402913b800a52c774009c9d92ae785481855 | |
parent | c4c9904b324736dc5d190a91418e8d8f564d4104 (diff) | |
download | haskell-wip/andreask/hadrian_ghc0_via_bash.tar.gz |
Hadrian: Invoke ghc0 via bash when running tests to fix #17362.wip/andreask/hadrian_ghc0_via_bash
cmd uses RawCommand which uses Windows semantics to find the executable
which sometimes seems to fail for unclear reasons.
If we invoke ghc via bash then bash will find the ghc executable and
the issue goes away.
-rw-r--r-- | hadrian/src/Rules/Test.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs index 84374ff492..9151188883 100644 --- a/hadrian/src/Rules/Test.hs +++ b/hadrian/src/Rules/Test.hs @@ -47,7 +47,9 @@ testRules = do -- Using program shipped with testsuite to generate ghcconfig file. root -/- ghcConfigProgPath %> \_ -> do ghc0Path <- (<.> exe) <$> getCompilerPath "stage0" - cmd [ghc0Path] [ghcConfigHsPath, "-o" , root -/- ghcConfigProgPath] + -- Invoke via bash to work around #17362. + -- Reasons why this is required are not entirely clear. + cmd ["bash"] ["-c", ghc0Path ++ " " ++ ghcConfigHsPath ++ " -o " ++ (root -/- ghcConfigProgPath)] -- Rules for building check-ppr and check-ppr-annotations with the compiler -- we are going to test (in-tree or out-of-tree). |