diff options
author | Flu0r1ne <flur01ne@flu0r1ne.net> | 2021-08-13 18:25:17 -0500 |
---|---|---|
committer | Flu0r1ne <flur01ne@flu0r1ne.net> | 2021-08-13 18:25:17 -0500 |
commit | 5d33040ab80b5cce7883b2e5965aa17db2e6515a (patch) | |
tree | effe42208df6f44933a057dcf8f999061359eed4 /adapters | |
parent | 4a808e5c97725b0fb4174b6961722a3f4600b9a7 (diff) | |
download | deb-planr-5d33040ab80b5cce7883b2e5965aa17db2e6515a.tar.xz deb-planr-5d33040ab80b5cce7883b2e5965aa17db2e6515a.zip |
Opt to show CLI output over JSON output
Diffstat (limited to 'adapters')
-rw-r--r-- | adapters/gtest/adapter.go | 6 | ||||
-rw-r--r-- | adapters/gtest/results.go | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/adapters/gtest/adapter.go b/adapters/gtest/adapter.go index 3d769e3..8dc333d 100644 --- a/adapters/gtest/adapter.go +++ b/adapters/gtest/adapter.go @@ -85,7 +85,8 @@ func (adapter *GtestAdapter) execTests(cnames []string) ResultFromId { defer cancel() defer os.Remove(f.Name()) - if err := cmd.Run(); err != nil { + out, err := cmd.CombinedOutput() + if err != nil { var exiterr *exec.ExitError if !errors.As(err, &exiterr) { @@ -95,6 +96,7 @@ func (adapter *GtestAdapter) execTests(cnames []string) ResultFromId { } for _, r := range decodeResults(f) { + r.testOutput = string(out) lut[exe + "." + r.id] = r } } @@ -169,6 +171,6 @@ func (adapter *GtestAdapter) Evaluate(tcs []*planr.TestCase) { tc.Result.Status = planr.RUNTIME_FAILURE } - tc.Result.FailureMsg = result.failureMsg + tc.Result.TestOutput = result.testOutput } } diff --git a/adapters/gtest/results.go b/adapters/gtest/results.go index 0e96edc..2991823 100644 --- a/adapters/gtest/results.go +++ b/adapters/gtest/results.go @@ -49,6 +49,7 @@ type Result struct { id string pass bool failureMsg string + testOutput string } func failureMsg(failures []gFailure) string { |