diff options
author | Flu0r1ne <flur01ne@flu0r1ne.net> | 2021-09-08 22:02:00 -0500 |
---|---|---|
committer | Flu0r1ne <flur01ne@flu0r1ne.net> | 2021-09-08 22:02:10 -0500 |
commit | 0f90c082815d717fc94d113823acd007f09a6b7d (patch) | |
tree | 3dc713b213db84751aa0e99a4140db9781db4305 /adapters/gtest | |
parent | 9fc2052af558aef1c73cfa3ad42f62c259f7a126 (diff) | |
download | planr-0.1.4.tar.xz planr-0.1.4.zip |
Add traces when segfaults prohibit JSON output from being omittedv0.1.4
Diffstat (limited to 'adapters/gtest')
-rw-r--r-- | adapters/gtest/executable.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/adapters/gtest/executable.go b/adapters/gtest/executable.go index bb47d9c..c52a189 100644 --- a/adapters/gtest/executable.go +++ b/adapters/gtest/executable.go @@ -91,7 +91,7 @@ func createExecutables(tcs []planr.TestCase) []executable { } func (exe executable) compile(builddir string) (succeeded bool, buildFailures []planr.TestResult) { - cmd := exec.Command("make", "-C", builddir, exe.exeNm) + cmd := exec.Command("make", "-C", builddir, exe.exeNm + "/fast") out, err := cmd.CombinedOutput() buildFailures = make([]planr.TestResult, 0) @@ -159,10 +159,11 @@ func runGtest(exe string, tc planr.TestCase, builddir string) planr.TestResult { } results, err := decodeResults(f) + result.TestOutput = string(out) if err != nil { - result.Status = planr.COMPILATION_FAILURE - result.DebugOutput += fmt.Sprintf("Could not collect results from %s: %v\n\nDid you mistakenly create a main?\n", exe, err) + result.Status = planr.RUNTIME_FAILURE + result.TestOutput += fmt.Sprintf("Could not collect results from %s: %v\n", exe, err) return result } @@ -182,8 +183,6 @@ func runGtest(exe string, tc planr.TestCase, builddir string) planr.TestResult { decodeResult := results[0] - result.TestOutput = string(out) - if decodeResult.pass { result.Status = planr.PASSING } else { |