Skip to content

Commit 52d509e

Browse files
committed
LibV09: restore exit on subprocess error
1 parent 35513a5 commit 52d509e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Cabal/src/Distribution/Simple/Test/LibV09.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ runTest pkg_descr lbi clbi flags suite = do
103103
-- TODO: this setup is broken,
104104
-- if the test output is too big, we will deadlock.
105105
(rOut, wOut) <- Process.createPipe
106-
(_exitcode, logText) <- rawSystemProcAction verbosity
106+
(exitcode, logText) <- rawSystemProcAction verbosity
107107
(proc cmd' opts') { Process.env = Just shellEnv'
108108
, Process.std_in = Process.CreatePipe
109109
, Process.std_out = Process.UseHandle wOut
@@ -119,6 +119,7 @@ runTest pkg_descr lbi clbi flags suite = do
119119
-- Force the IO manager to drain the test output pipe
120120
_ <- evaluate (force logText)
121121
return logText
122+
unless (exitcode == ExitSuccess) $ exitWith exitcode
122123

123124
-- Generate final log file name
124125
let finalLogName l = testLogDir

0 commit comments

Comments
 (0)