summaryrefslogtreecommitdiff
path: root/src/Run.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2026-08-24 22:58:17 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2026-08-24 23:01:53 +0200
commitec493e03b0415f43968c0a04598ada3272a0f0cf (patch)
treee59a2c2f9566d3710f4f7d81cbbe0b584ac964ae /src/Run.hs
parent24f39540d34c819c7870adce9f363af704c7cda7 (diff)
Add hook to TestOptions to get result of each testHEADmaster
Diffstat (limited to 'src/Run.hs')
-rw-r--r--src/Run.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Run.hs b/src/Run.hs
index a646342..a253e51 100644
--- a/src/Run.hs
+++ b/src/Run.hs
@@ -156,8 +156,8 @@ runTest out opts gdefs test = do
[] <- readMVar procVar
failed <- atomically $ readTVar (teFailed tenv)
- case (res, failed) of
- (Right (), Nothing) -> do
+ fres <- case ( res, failed ) of
+ ( Right (), Nothing ) -> do
when (not $ optKeep opts) $ removeDirectoryRecursive testDir
return True
_ -> do
@@ -165,6 +165,9 @@ runTest out opts gdefs test = do
void $ outLine OutputGlobalError Nothing $ "Test ‘" <> textTestName (testName test) <> "’ failed."
return False
+ (optHookTestResult opts) (testName test) fres
+ return fres
+
data LoadedModules = LoadedModules
{ lmModules :: [ Module ]