diff options
author | Andreas Klebinger <klebinger.andreas@gmx.at> | 2019-10-22 09:19:28 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-10-23 05:59:07 -0400 |
commit | bb0dc5a5c1d1fa583b73835d8cb7055020834051 (patch) | |
tree | 03df2d613dea5ac764defa4787611fe6ed67f901 /hadrian | |
parent | 21663693524838cf0621a887602368fcb54c1c0a (diff) | |
download | haskell-bb0dc5a5c1d1fa583b73835d8cb7055020834051.tar.gz |
Hadrian: Invoke ghc0 via bash when running tests to fix #17362.
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.
Diffstat (limited to 'hadrian')
-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). |