diff options
author | Flu0r1ne <flur01ne@flu0r1ne.net> | 2021-08-05 18:41:53 -0500 |
---|---|---|
committer | Flu0r1ne <flur01ne@flu0r1ne.net> | 2021-08-05 18:41:53 -0500 |
commit | cbc5fbdf941cd40dc6a9546fb924689f5d6978c7 (patch) | |
tree | 734bfa515ddeab208c35c50624cfd9f1124ce6cf /adapters/gtest/results.go | |
parent | 05ce22f9d2308bca51b48fb60558d17f2e381227 (diff) | |
download | deb-planr-cbc5fbdf941cd40dc6a9546fb924689f5d6978c7.tar.xz deb-planr-cbc5fbdf941cd40dc6a9546fb924689f5d6978c7.zip |
Improvised a basic text report, finished evaluation mappings
Diffstat (limited to 'adapters/gtest/results.go')
-rw-r--r-- | adapters/gtest/results.go | 17 |
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, + }, }) + } } |