diff --git a/balls.nimble b/balls.nimble index d239956..5b5f76f 100644 --- a/balls.nimble +++ b/balls.nimble @@ -1,4 +1,4 @@ -version = "2.5.4" +version = "2.6.0" author = "disruptek" description = "a unittest framework with balls 🔴🟡🟢" license = "MIT" diff --git a/balls/runner.nim b/balls/runner.nim index 10e6e22..8efcf70 100644 --- a/balls/runner.nim +++ b/balls/runner.nim @@ -76,8 +76,8 @@ proc cmp*(a, b: Profile): int = ## Compare Profiles `a`, `b` for the purposes of test ordering. ## Note that this comparison does not measure test filename. cmper cp - cmper opt cmper gc + cmper opt proc `<`*(a, b: Profile): bool {.used.} = ## Compare Profiles `a`, `b` for the purposes of test ordering. @@ -430,6 +430,13 @@ proc main*(directory: string; fallback = false) = # try to find something good to run in the current directory tests = ordered(getCurrentDir(), testsOnly = false) - # run the best input you found in the order you found it + var profiles: seq[Profile] + # generate profiles for the ordered inputs for test in tests.items: - matrix.perform test.profiles + profiles = concat(profiles, test.profiles) + + # polish the profile order to smoke the project faster + sort profiles + + # run the profiles + matrix.perform profiles