mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-28 11:05:17 +03:00
[ golden ] Split runner to be able to run with custom options
This commit is contained in:
parent
162d9e942b
commit
1402194f14
@ -592,18 +592,15 @@ poolRunner opts pool
|
||||
++ msgs
|
||||
++ [ separator ]
|
||||
|
||||
||| A runner for a whole test suite
|
||||
export
|
||||
runner : List TestPool -> IO ()
|
||||
runner tests
|
||||
= do args <- getArgs
|
||||
Just opts <- options args
|
||||
| _ => do printLn args
|
||||
putStrLn usage
|
||||
runnerWith : Options -> List TestPool -> IO ()
|
||||
runnerWith opts tests = do
|
||||
|
||||
-- if no CG has been set, find a sensible default based on what is available
|
||||
opts <- case codegen opts of
|
||||
Nothing => pure $ { codegen := !findCG } opts
|
||||
Just _ => pure opts
|
||||
|
||||
-- run the tests
|
||||
res <- concat <$> traverse (poolRunner opts) tests
|
||||
|
||||
@ -628,3 +625,13 @@ runner tests
|
||||
if nfail == 0
|
||||
then exitWith ExitSuccess
|
||||
else exitWith (ExitFailure 1)
|
||||
|
||||
||| A runner for a whole test suite
|
||||
export
|
||||
runner : List TestPool -> IO ()
|
||||
runner tests
|
||||
= do args <- getArgs
|
||||
Just opts <- options args
|
||||
| _ => do printLn args
|
||||
putStrLn usage
|
||||
runnerWith opts tests
|
||||
|
Loading…
Reference in New Issue
Block a user