summaryrefslogtreecommitdiff
path: root/src/TestMode.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/TestMode.hs')
-rw-r--r--src/TestMode.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/TestMode.hs b/src/TestMode.hs
index 4d8c767..90ced30 100644
--- a/src/TestMode.hs
+++ b/src/TestMode.hs
@@ -88,6 +88,9 @@ runSingleTest test = do
{ optDefaultTool = fromMaybe "/bin/true" $ configTool =<< mbconfig
, optTestDir = ".test" <> show num
, optKeep = True
+ , optHookTestResult = \tname res -> do
+ flip runReaderT out $ outLine OutputTestRaw Nothing $
+ "run-test-result " <> testNameBase tname <> " " <> (if res then "done" else "failed")
}
liftIO (runTest out opts lmGlobalDefs test)
@@ -162,6 +165,5 @@ cmdRun = do
Left err -> showError "run-failed" err
Right tests -> do
forM_ tests $ \test -> do
- res <- runSingleTest test
- cmdOut $ "run-test-result " <> testNameBase (testName test) <> " " <> (if res then "done" else "failed")
+ runSingleTest test
cmdOut "run-done"