summaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 6cf5405..1a7e286 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -50,6 +50,7 @@ data Node = Node
data Options = Options
{ optDefaultTool :: String
, optProcTools :: [(ProcName, String)]
+ , optVerbose :: Bool
, optTimeout :: Scientific
, optGDB :: Bool
}
@@ -58,6 +59,7 @@ defaultOptions :: Options
defaultOptions = Options
{ optDefaultTool = ""
, optProcTools = []
+ , optVerbose = False
, optTimeout = 1
, optGDB = False
}
@@ -327,6 +329,9 @@ options =
(pname, (_:path)) -> opts { optProcTools = (ProcName (T.pack pname), path) : optProcTools opts }
) "PATH")
"test tool to be used"
+ , Option ['v'] ["verbose"]
+ (NoArg (\opts -> opts { optVerbose = True }))
+ "show output of processes and successful tests"
, Option ['t'] ["timeout"]
(ReqArg (\str opts -> case readMaybe str of
Just timeout -> opts { optTimeout = timeout }
@@ -348,5 +353,5 @@ main = do
optDefaultTool opts `seq` return ()
- out <- startOutput
+ out <- startOutput $ optVerbose opts
forM_ files $ mapM_ (runTest out opts) <=< parseTestFile