summaryrefslogtreecommitdiff
path: root/adapters/gtest
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/gtest')
-rw-r--r--adapters/gtest/adapter.go21
1 files changed, 14 insertions, 7 deletions
diff --git a/adapters/gtest/adapter.go b/adapters/gtest/adapter.go
index ec11748..2961f29 100644
--- a/adapters/gtest/adapter.go
+++ b/adapters/gtest/adapter.go
@@ -59,17 +59,24 @@ func (adapter *Adapter) Evaluate(tcs []planr.TestCase) [] planr.TestResult {
exes := createExecutables(tcs)
+ c := make(chan []planr.TestResult, len(exes))
for i := range exes {
- succeed, buildFailures := exes[i].compile(buildDir)
+ go func(exe *executable) {
+ succeed, buildFailures := exe.compile(buildDir)
- if ! succeed {
- results = append(results, buildFailures...)
- continue
- }
+ if ! succeed {
+ c <- buildFailures
+ return
+ }
- runtimeResults := exes[i].execute(buildDir)
+ runtimeResults := exe.execute(buildDir)
- results = append(results, runtimeResults...)
+ c <- runtimeResults
+ }(&exes[i])
+ }
+
+ for range exes {
+ results = append(results, (<-c)...)
}
return results