summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--adapters/bash/adapter.go13
1 files changed, 10 insertions, 3 deletions
diff --git a/adapters/bash/adapter.go b/adapters/bash/adapter.go
index b98523e..65a6c80 100644
--- a/adapters/bash/adapter.go
+++ b/adapters/bash/adapter.go
@@ -83,9 +83,16 @@ func executeScriptedTest(testdir string, tc planr.TestCase) planr.TestResult {
func (adapter Adapter) Evaluate(tcs []planr.TestCase) [] planr.TestResult {
finalizeConfigs(tcs)
- trs := make([]planr.TestResult, len(tcs))
- for i, tc := range tcs {
- trs[i] = executeScriptedTest(adapter.dirs.Tests(), tc)
+ trs := make([]planr.TestResult, 0)
+ c := make(chan planr.TestResult, 0)
+ for i := range tcs {
+ go func(i int) {
+ c <- executeScriptedTest(adapter.dirs.Tests(), tcs[i])
+ }(i)
+ }
+
+ for range tcs {
+ trs = append(trs, <-c)
}
return trs