summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2024-05-16 22:17:05 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2024-05-17 19:35:21 +0200
commitcd4b94ad3beb2063fa6b3b8efacdca9bfeeb45e4 (patch)
treeb78eb43b6e954cf68d219c7a885fb321a58e0ece
parentd8418e42499e3642a8714ef11746758bfd35c5c4 (diff)
Describe command-line test selection in help text
Changelog: Documentation and helptext updates
-rw-r--r--src/Main.hs14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/Main.hs b/src/Main.hs
index eb34c62..f296a12 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -47,7 +47,7 @@ options =
(ReqArg (\str -> to $ \opts -> case break (==':') str of
(path, []) -> opts { optDefaultTool = path }
(pname, (_:path)) -> opts { optProcTools = (ProcName (T.pack pname), path) : optProcTools opts }
- ) "PATH")
+ ) "<path>")
"test tool to be used"
, Option ['v'] ["verbose"]
(NoArg (\opts -> opts { optVerbose = True }))
@@ -55,7 +55,7 @@ options =
, Option ['t'] ["timeout"]
(ReqArg (\str -> to $ \opts -> case readMaybe str of
Just timeout -> opts { optTimeout = timeout }
- Nothing -> error "timeout must be a number") "SECONDS")
+ Nothing -> error "timeout must be a number") "<seconds>")
"default timeout in seconds with microsecond precision"
, Option ['g'] ["gdb"]
(NoArg $ to $ \opts -> opts { optGDB = True })
@@ -67,7 +67,7 @@ options =
(NoArg $ to $ \opts -> opts { optKeep = True })
"keep test directory even if all tests succeed"
, Option ['r'] ["repeat"]
- (ReqArg (\str opts -> opts { optRepeat = read str }) "COUNT")
+ (ReqArg (\str opts -> opts { optRepeat = read str }) "<count>")
"number of times to repeat the test(s)"
, Option [] ["wait"]
(NoArg $ to $ \opts -> opts { optWait = True })
@@ -106,7 +106,13 @@ main = do
exitFailure
when (optShowHelp opts) $ do
- let header = "Usage: erebos-tester [OPTION...]"
+ let header = unlines
+ [ "Usage: erebos-tester [<option>...] [<script>[:<test>]...]"
+ , " <script> path to test script file"
+ , " <test> name of the test to run"
+ , ""
+ ]
+ <> "Options are:"
putStrLn $ usageInfo header options
exitSuccess