aboutsummaryrefslogtreecommitdiff
path: root/runner.go
diff options
context:
space:
mode:
Diffstat (limited to 'runner.go')
-rw-r--r--runner.go19
1 files changed, 13 insertions, 6 deletions
diff --git a/runner.go b/runner.go
index 2d66dc6..9c1e385 100644
--- a/runner.go
+++ b/runner.go
@@ -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())