Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- getSettings :: IO Settings
- data Settings = Settings {
- settingSeed :: !Int
- settingRandomiseExecutionOrder :: !Bool
- settingThreads :: !Threads
- settingMaxSuccess :: !Int
- settingMaxSize :: !Int
- settingMaxDiscard :: !Int
- settingMaxShrinks :: !Int
- settingGoldenStart :: !Bool
- settingGoldenReset :: !Bool
- settingColour :: !(Maybe Bool)
- settingFilter :: !(Maybe Text)
- settingFailFast :: !Bool
- settingIterations :: Iterations
- defaultSettings :: Settings
- data Threads
- data Iterations
- combineToSettings :: Flags -> Environment -> Maybe Configuration -> IO Settings
- data Configuration = Configuration {
- configSeed :: !(Maybe Int)
- configRandomiseExecutionOrder :: !(Maybe Bool)
- configThreads :: !(Maybe Threads)
- configMaxSize :: !(Maybe Int)
- configMaxSuccess :: !(Maybe Int)
- configMaxDiscard :: !(Maybe Int)
- configMaxShrinks :: !(Maybe Int)
- configGoldenStart :: !(Maybe Bool)
- configGoldenReset :: !(Maybe Bool)
- configColour :: !(Maybe Bool)
- configFilter :: !(Maybe Text)
- configFailFast :: !(Maybe Bool)
- configIterations :: !(Maybe Iterations)
- getConfiguration :: Flags -> Environment -> IO (Maybe Configuration)
- defaultConfigFile :: IO (Path Abs File)
- data Environment = Environment {
- envConfigFile :: Maybe FilePath
- envSeed :: !(Maybe Int)
- envRandomiseExecutionOrder :: !(Maybe Bool)
- envThreads :: !(Maybe Threads)
- envMaxSize :: !(Maybe Int)
- envMaxSuccess :: !(Maybe Int)
- envMaxDiscard :: !(Maybe Int)
- envMaxShrinks :: !(Maybe Int)
- envGoldenStart :: !(Maybe Bool)
- envGoldenReset :: !(Maybe Bool)
- envColour :: !(Maybe Bool)
- envFilter :: !(Maybe Text)
- envFailFast :: !(Maybe Bool)
- envIterations :: !(Maybe Iterations)
- getEnvironment :: IO Environment
- environmentParser :: Parser Error Environment
- getFlags :: IO Flags
- prefs_ :: ParserPrefs
- flagsParser :: ParserInfo Flags
- data Flags = Flags {
- flagConfigFile :: !(Maybe FilePath)
- flagSeed :: !(Maybe Int)
- flagRandomiseExecutionOrder :: !(Maybe Bool)
- flagThreads :: !(Maybe Threads)
- flagMaxSuccess :: !(Maybe Int)
- flagMaxSize :: !(Maybe Int)
- flagMaxDiscard :: !(Maybe Int)
- flagMaxShrinks :: !(Maybe Int)
- flagGoldenStart :: !(Maybe Bool)
- flagGoldenReset :: !(Maybe Bool)
- flagColour :: !(Maybe Bool)
- flagFilter :: !(Maybe Text)
- flagFailFast :: !(Maybe Bool)
- flagIterations :: !(Maybe Iterations)
- parseFlags :: Parser Flags
Documentation
getSettings :: IO Settings Source #
Test suite definition and run settings
Settings | |
|
Instances
Synchronous | One thread |
ByCapabilities | As many threads as |
Asynchronous Int | A given number of threads |
Instances
Eq Threads Source # | |
Show Threads Source # | |
Generic Threads Source # | |
YamlSchema Threads Source # | |
Defined in Test.Syd.OptParse | |
type Rep Threads Source # | |
Defined in Test.Syd.OptParse type Rep Threads = D1 ('MetaData "Threads" "Test.Syd.OptParse" "sydtest-0.3.0.1-2poxP19vSfQF1Lucmar4St" 'False) (C1 ('MetaCons "Synchronous" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ByCapabilities" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Asynchronous" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))) |
data Iterations Source #
OneIteration | Run the test suite once, the default |
Iterations Int | Run the test suite for the given number of iterations, or until we can find flakiness |
Continuous | Run the test suite over and over, until we can find some flakiness |
Instances
combineToSettings :: Flags -> Environment -> Maybe Configuration -> IO Settings Source #
Combine everything to Settings
data Configuration Source #
What we find in the configuration variable.
Do nothing clever here, just represent the configuration file. For example, use 'Maybe FilePath', not 'Path Abs File'.
Use readConfigFile
or readFirstConfigFile
to read a configuration.
Configuration | |
|
Instances
getConfiguration :: Flags -> Environment -> IO (Maybe Configuration) Source #
Get the configuration
We use the flags and environment because they can contain information to override where to look for the configuration files.
We return a Maybe
because there may not be a configuration file.
data Environment Source #
What we find in the configuration variable.
Do nothing clever here, just represent the relevant parts of the environment.
For example, use Text
, not SqliteConfig
.
Environment | |
|
Instances
environmentParser :: Parser Error Environment Source #
The envparse
parser for the Environment
prefs_ :: ParserPrefs Source #
The 'optparse-applicative' parsing preferences
flagsParser :: ParserInfo Flags Source #
The optparse-applicative
parser for Flags
The flags that are common across commands.
Flags | |
|