Verified Commit c149369d authored by Camil Staps's avatar Camil Staps 🚀

Cleanup

parent 1e20f7ff
......@@ -225,6 +225,18 @@ where
prepend _ [] = []
prepend p [x:xs] = [p,x:prepend p xs]
list :: !TestRun !*World -> *(![String], !*World)
list r w
# (h,w) = runProcessIO r.TestRun.name ["--list"] Nothing w
| isError h = ([], w)
# (h,io) = fromOk h
# (c,w) = waitForProcess h w
| isError c = ([], w)
# (s,w) = readPipeBlocking io.stdOut w
| isError s = ([], w)
# (_,w) = closeProcessIO io w
= (filter (not o (==) 0 o size) $ map trim $ split "\n" (fromOk s), w)
run :: !Options !SubTestRun !*World -> *(!RunResult, !*World)
run opts r w
# (io,w) = stdio w
......@@ -233,21 +245,9 @@ run opts r w
# (extra_opts,r,w) = case r of
JustRun r -> (Just [], r, w)
Only names r -> (Just ["--run":intersperse "--run" names], r, w)
Without names r -> appFst3 (\all -> case difference all names of
Without names r -> (\(all,w) -> (case difference all names of
[] -> Nothing
_ -> Just ["--skip":intersperse "--skip" names]) $ list w
with
list :: !*World -> *(![String], !TestRun, !*World)
list w
# (h,w) = runProcessIO r.TestRun.name ["--list"] Nothing w
| isError h = ([], r, w)
# (h,io) = fromOk h
# (c,w) = waitForProcess h w
| isError c = ([], r, w)
# (s,w) = readPipeBlocking io.stdOut w
| isError s = ([], r, w)
# (_,w) = closeProcessIO io w
= (filter (not o (==) 0 o size) $ map trim $ split "\n" (fromOk s), r, w)
_ -> Just ["--skip":intersperse "--skip" names], r, w)) $ list r w
| isNothing extra_opts
# io = emit (EndEvent
{ name = r.TestRun.name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment