- -- note: we do this overriding here since we need some groups to
- -- have a smaller test count; so in effect we're basically
- -- overriding t-f's inheritance here, but only for max_tests
- let (act_fast, act_slow) =
- case ropt_test_options ropts of
- Nothing -> (fast, slow)
- Just topts -> (makeSlowOrFast True topts, makeSlowOrFast False topts)
- actual_opts is_fast = if is_fast then act_fast else act_slow
- let tests = map (\(is_fast, (group_name, group_tests)) ->
- plusTestOptions (actual_opts is_fast) $
- testGroup group_name group_tests) allTests
- defaultMainWithOpts tests ropts
+ let opts = maybe defOpts (defOpts `mappend`) $ ropt_test_options ropts
+ defaultMainWithOpts allTests (ropts { ropt_test_options = Just opts })