run a single loop test

This commit is contained in:
Tom Sydney Kerckhove 2022-03-06 13:44:42 +01:00
parent 50365c9a60
commit dac63db4d9
3 changed files with 6 additions and 2 deletions

View File

@ -51,6 +51,7 @@ See `feedback-test --help` for more details.
| Cancelling previous runs that aren't done yet | ✔️ | ✔️ | ✔️ | ✖ |
| Long-form flags for every option | ✔️ | ✔️ | ✔️ | ✖ |
| CI integration | ✔️ | C | C | C |
| Indication of how long the loop took | ✔️ | C | C | C |
* ✔️: Supported
* C: Possible but you have to write some code yourself

View File

@ -19,7 +19,7 @@ indicatorChunk :: String -> Chunk
indicatorChunk = fore cyan . chunk . T.pack
loopNameChunk :: String -> Chunk
loopNameChunk = chunk . T.pack
loopNameChunk = fore yellow . chunk . T.pack
commandChunk :: String -> Chunk
commandChunk = fore blue . chunk . T.pack

View File

@ -22,10 +22,13 @@ data TestSettings = TestSettings
combineToTestSettings :: Flags -> Environment -> Maybe Configuration -> IO TestSettings
combineToTestSettings flags@Flags {..} environment mConf = do
let filterFunc = case flagCommand of
"" -> id
_ -> M.filterWithKey (\k _ -> k == flagCommand)
testSettingLoops <-
traverse
(combineToLoopSettings flags environment (mConf >>= configOutputConfiguration))
(maybe M.empty configLoops mConf)
(filterFunc $ maybe M.empty configLoops mConf)
let testSets = TestSettings {..}
when flagDebug $ pPrint testSets
pure testSets