summaryrefslogtreecommitdiff
path: root/adapters/gtest/results.go
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/gtest/results.go')
-rw-r--r--adapters/gtest/results.go17
1 files changed, 13 insertions, 4 deletions
diff --git a/adapters/gtest/results.go b/adapters/gtest/results.go
index e5280e3..88e4069 100644
--- a/adapters/gtest/results.go
+++ b/adapters/gtest/results.go
@@ -47,7 +47,12 @@ type gResults struct {
Testsuites []gTestsuites `json:"testsuites"`
}
-func decodeResults(r io.Reader) []planr.TestResult {
+type Result struct {
+ id string
+ result planr.TestResult
+}
+
+func decodeResults(r io.Reader) []Result {
var results gResults
buf := bytes.Buffer{}
@@ -59,14 +64,18 @@ func decodeResults(r io.Reader) []planr.TestResult {
log.Fatal(err)
}
- decoded := make([]planr.TestResult, 0)
+ decoded := make([]Result, 0)
for _, suite := range results.Testsuites {
for _, test := range suite.Testsuite {
n := len(test.Failures)
- decoded = append(decoded, planr.TestResult {
- Pass: n == 0,
+ decoded = append(decoded, Result{
+ id: suite.Name + "." + test.Name,
+ result: planr.TestResult {
+ Pass: n == 0,
+ },
})
+
}
}