summaryrefslogtreecommitdiff
path: root/src/Run.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2026-10-17 15:51:31 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2026-10-20 20:21:44 +0200
commite56577e4506c7db72aef9e273cfa00592ca20829 (patch)
tree56f20cef616bcff2223fd8db4cf1cb7df5157291 /src/Run.hs
parent5f892bc3cd212f362b0a8f29528b783b142da8e8 (diff)
Do not look for config file in parent dirs in test mode
Diffstat (limited to 'src/Run.hs')
-rw-r--r--src/Run.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Run.hs b/src/Run.hs
index a1184c4..53a0275 100644
--- a/src/Run.hs
+++ b/src/Run.hs
@@ -124,7 +124,7 @@ runTest out opts gdefs test = do
objIdVar <- newMVar 1
procIdVar <- newMVar 1
procVar <- newMVar []
- timeoutVar <- newMVar ( optTimeout opts, 0 )
+ timeoutVar <- newMVar ( fromMaybe 1 $ optTimeout opts, 0 )
let evalTool = \case
ToolPath path -> return path
@@ -139,7 +139,9 @@ runTest out opts gdefs test = do
ioError $ userError $ "failed to find ‘" <> T.unpack name <> "’ executable path using cabal"
| otherwise
-> return $ T.unpack arg
- defaultTool <- evalTool $ optDefaultTool opts
+ defaultTool <- case optDefaultTool opts of
+ Just tool -> evalTool tool
+ Nothing -> ioError $ userError "No test tool defined"
procTools <- mapM (sequence . fmap evalTool) $ optProcTools opts
mgdb <- if optGDB opts