diff options
-rw-r--r-- | hadrian/src/Builder.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hadrian/src/Builder.hs b/hadrian/src/Builder.hs index aac3b26370..f2f69bb4ab 100644 --- a/hadrian/src/Builder.hs +++ b/hadrian/src/Builder.hs @@ -311,7 +311,10 @@ instance H.Builder Builder where -- RunTest produces a very large amount of (colorised) output; -- Don't attempt to capture it. - RunTest -> cmd echo [path] buildArgs + RunTest -> do + Exit code <- cmd echo [path] buildArgs + when (code /= ExitSuccess) $ do + fail "tests failed" _ -> cmd' echo [path] buildArgs |