| Safe Haskell | None |
|---|
Test.Framework.CmdlineOptions
Description
This module defines the commandline options of the test driver provided by HTF.
- data CmdlineOptions = CmdlineOptions {
- opts_quiet :: Bool
- opts_filter :: TestFilter
- opts_help :: Bool
- opts_negated :: [String]
- opts_threads :: Maybe Int
- opts_shuffle :: Bool
- opts_machineOutput :: Bool
- opts_machineOutputXml :: Maybe FilePath
- opts_useColors :: Maybe Bool
- opts_outputFile :: Maybe FilePath
- opts_listTests :: Bool
- opts_split :: Bool
- opts_historyFile :: Maybe FilePath
- opts_failFast :: Bool
- opts_sortByPrevTime :: Bool
- opts_maxPrevTimeMs :: Maybe Milliseconds
- opts_maxCurTimeMs :: Maybe Milliseconds
- opts_prevFactor :: Maybe Double
- opts_timeoutIsSuccess :: Bool
- defaultCmdlineOptions :: CmdlineOptions
- parseTestArgs :: [String] -> Either String CmdlineOptions
- helpString :: String
- testConfigFromCmdlineOptions :: CmdlineOptions -> IO TestConfig
Documentation
data CmdlineOptions Source
Commandline options for running tests.
Constructors
| CmdlineOptions | |
Fields
| |
defaultCmdlineOptions :: CmdlineOptionsSource
The default CmdlineOptions.
parseTestArgs :: [String] -> Either String CmdlineOptionsSource
Parse commandline arguments into CmdlineOptions. Here is a synopsis
of the format of the commandline arguments:
USAGE: COMMAND [OPTION ...] PATTERN ...
where PATTERN is a posix regular expression matching
the names of the tests to run.
-q --quiet Only display errors.
-n PATTERN --not=PATTERN Tests to exclude.
-l --list List all matching tests.
-j[N] --threads[=N] Run N tests in parallel, default N=1.
--deterministic Do not shuffle tests when executing them in parallel.
-o FILE --output-file=FILE Name of output file.
--json Output results in machine-readable JSON format (incremental).
--xml=FILE Output results in junit-style XML format.
--split Splits results in separate files to avoid file locking (requires -o/--output-file).
--colors=BOOL Use colors or not.
--history=FILE Path to the history file. Default: ./.HTF/<ProgramName>.history
--fail-fast Fail and abort test run as soon as the first test fails.
--sort-by-prev-time Sort tests ascending by their execution of the previous test run (if available). Default: false
--max-prev-ms=MILLISECONDS Do not try to execute tests that had a execution time greater than MILLISECONDS in a previous test run.
--max-cur-ms=MILLISECONDS Abort a test that runs more than MILLISECONDS.
--prev-factor=DOUBLE Abort a test that runs more than DOUBLE times slower than in a previous run.
--timeout-is-success Do not regard a test timeout as an error.
-h --help Display this message.
helpString :: StringSource
The string displayed for the --help option.
testConfigFromCmdlineOptions :: CmdlineOptions -> IO TestConfigSource
Turn the CmdlineOptions into a TestConfig.