Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- getSettings :: IO Settings
- data Settings = Settings {
- settingSeed :: !SeedSetting
- 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
- settingRetries :: !Word
- settingFailOnFlaky :: !Bool
- settingReportProgress :: !ReportProgress
- settingDebug :: !Bool
- defaultSettings :: Settings
- defaultRetries :: Word
- deriveTerminalCapababilities :: Settings -> IO TerminalCapabilities
- detectTerminalCapabilities :: IO TerminalCapabilities
- data Threads
- data Iterations
- data ReportProgress
- combineToSettings :: Flags -> Environment -> Maybe Configuration -> IO Settings
- data Configuration = Configuration {
- configSeed :: !(Maybe SeedSetting)
- 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)
- configRetries :: !(Maybe Word)
- configFailOnFlaky :: !(Maybe Bool)
- configReportProgress :: !(Maybe Bool)
- configDebug :: !(Maybe Bool)
- getConfiguration :: Flags -> Environment -> IO (Maybe Configuration)
- defaultConfigFile :: IO (Path Abs File)
- data Environment = Environment {
- envConfigFile :: Maybe FilePath
- envSeed :: !(Maybe SeedSetting)
- 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)
- envRetries :: !(Maybe Word)
- envFailOnFlaky :: !(Maybe Bool)
- envReportProgress :: !(Maybe Bool)
- envDebug :: !(Maybe Bool)
- defaultEnvironment :: Environment
- getEnvironment :: IO Environment
- environmentParser :: Parser Error Environment
- seedSettingEnvironmentParser :: Parser Error (Maybe SeedSetting)
- getFlags :: IO Flags
- prefs_ :: ParserPrefs
- flagsParser :: ParserInfo Flags
- data Flags = Flags {
- flagConfigFile :: !(Maybe FilePath)
- flagSeed :: !(Maybe SeedSetting)
- flagRandomiseExecutionOrder :: !(Maybe Bool)
- flagThreads :: !(Maybe Threads)
- flagMaxSize :: !(Maybe Int)
- flagMaxSuccess :: !(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)
- flagRetries :: !(Maybe Word)
- flagFailOnFlaky :: !(Maybe Bool)
- flagReportProgress :: !(Maybe Bool)
- flagDebug :: !(Maybe Bool)
- defaultFlags :: Flags
- parseFlags :: Parser Flags
- seedSettingFlags :: Parser (Maybe SeedSetting)
- doubleSwitch :: [String] -> Mod FlagFields (Maybe Bool) -> Parser (Maybe Bool)
Documentation
getSettings :: IO Settings Source #
Test suite definition and run settings
Settings | |
|
Instances
Synchronous | One thread |
ByCapabilities | As many threads as |
Asynchronous !Word | A given number of threads |
Instances
HasCodec Threads Source # | |
Defined in Test.Syd.OptParse | |
Generic Threads Source # | |
Read Threads Source # | |
Show Threads Source # | |
Eq Threads Source # | |
type Rep Threads Source # | |
Defined in Test.Syd.OptParse type Rep Threads = D1 ('MetaData "Threads" "Test.Syd.OptParse" "sydtest-0.12.0.0-2Z251uiEwLpGxVASNsaRQP" '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 'SourceStrict 'DecidedStrict) (Rec0 Word)))) |
data Iterations Source #
OneIteration | Run the test suite once, the default |
Iterations !Word | 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
data ReportProgress Source #
ReportNoProgress | Don't report any progress, the default |
ReportProgress | Report progress |
Instances
Generic ReportProgress Source # | |
Defined in Test.Syd.OptParse type Rep ReportProgress :: Type -> Type # from :: ReportProgress -> Rep ReportProgress x # to :: Rep ReportProgress x -> ReportProgress # | |
Read ReportProgress Source # | |
Defined in Test.Syd.OptParse readsPrec :: Int -> ReadS ReportProgress # readList :: ReadS [ReportProgress] # | |
Show ReportProgress Source # | |
Defined in Test.Syd.OptParse showsPrec :: Int -> ReportProgress -> ShowS # show :: ReportProgress -> String # showList :: [ReportProgress] -> ShowS # | |
Eq ReportProgress Source # | |
Defined in Test.Syd.OptParse (==) :: ReportProgress -> ReportProgress -> Bool # (/=) :: ReportProgress -> ReportProgress -> Bool # | |
type Rep ReportProgress Source # | |
Defined in Test.Syd.OptParse |
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 readYamlConfigFile
or readFirstYamlConfigFile
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 | |
|
Instances
defaultFlags :: Flags Source #