diff options
-rw-r--r-- | runner.go | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -111,15 +111,22 @@ func (r Runner) Build(tcs []TestCase) { func (r Runner) Evaluate(tcs []TestCase) []TestResult { testSets := r.groupByAdapter(tcs) results := make([]TestResult, 0) - + + c := make(chan []TestResult) for _, pair := range testSets { - adapter := pair.adapter - cases := pair.tcs + go func (pair adapterTestSet) { + adapter := pair.adapter + cases := pair.tcs - r.setupEnv(adapter) - resultSet := adapter.Evaluate(cases) + r.setupEnv(adapter) + resultSet := adapter.Evaluate(cases) + + c <- resultSet + }(pair) + } - results = append(results, resultSet...) + for range testSets { + results = append(results, (<-c)...) } safeCd(r.dirs.Config()) |