diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2022-05-04 21:35:57 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2022-05-04 21:35:57 +0200 |
commit | 102c300550cab9ac14b26e79ad6a560c02781743 (patch) | |
tree | eed43c2e8c0ff39f4b8348fa48516ed8270226a0 /src/Main.hs | |
parent | 359607468fac0ed11bfc1a3579c69fe4310419cb (diff) |
Verbose option, otherwise hide most output
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 7 |
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 |