summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordoyougnu <jeffrey.young@iohk.io>2022-10-22 08:15:14 -0400
committerdoyougnu <jeffrey.young@iohk.io>2022-10-22 08:15:14 -0400
commit722f2b0bd380bf6601e82968b4a4dc245221832c (patch)
tree4a5dc4169533d72145a90fc9217d91703e85fbc9
parent5881a4fbbd071bf2e70a975f1591fd5046b31a66 (diff)
downloadhaskell-722f2b0bd380bf6601e82968b4a4dc245221832c.tar.gz
hadrian: fix js and native testing
-rw-r--r--hadrian/src/Rules/Test.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs
index da5b2366eb..92f88eef32 100644
--- a/hadrian/src/Rules/Test.hs
+++ b/hadrian/src/Rules/Test.hs
@@ -193,6 +193,11 @@ testRules = do
need [root -/- timeoutPath]
cross <- flag CrossCompiling
+ isJs <- isJsTarget
+
+ let stage2 s
+ | Stage2 {} <- s = True
+ | otherwise = False
-- get absolute path for the given program in the given stage
let absolute_path_stage s p = do
@@ -202,8 +207,8 @@ testRules = do
-- get absolute path for the given program in the target stage
let absolute_path
- | Stage0 {} <- stg = absolute_path_stage stg
- | otherwise = absolute_path_stage $ predStage stg
+ | isJs && stage2 stg = absolute_path_stage (predStage stg)
+ | otherwise = absolute_path_stage stg
-- get absolute path for the given program in stage1 (useful for
-- cross-compilers)