summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2019-10-22 09:19:28 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-10-23 05:59:07 -0400
commitbb0dc5a5c1d1fa583b73835d8cb7055020834051 (patch)
tree03df2d613dea5ac764defa4787611fe6ed67f901 /hadrian
parent21663693524838cf0621a887602368fcb54c1c0a (diff)
downloadhaskell-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.hs4
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).