aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlu0r1ne <flur01ne@flu0r1ne.net>2021-09-08 22:02:00 -0500
committerFlu0r1ne <flur01ne@flu0r1ne.net>2021-09-08 22:02:10 -0500
commit0f90c082815d717fc94d113823acd007f09a6b7d (patch)
tree3dc713b213db84751aa0e99a4140db9781db4305
parent9fc2052af558aef1c73cfa3ad42f62c259f7a126 (diff)
downloadplanr-0.1.4.tar.xz
planr-0.1.4.zip
Add traces when segfaults prohibit JSON output from being omittedv0.1.4
-rw-r--r--adapters/gtest/executable.go9
-rw-r--r--cmd/planr/sub/cli.go2
-rw-r--r--version.go2
3 files changed, 6 insertions, 7 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 {
diff --git a/cmd/planr/sub/cli.go b/cmd/planr/sub/cli.go
index 4d29144..5defa96 100644
--- a/cmd/planr/sub/cli.go
+++ b/cmd/planr/sub/cli.go
@@ -91,7 +91,7 @@ func tcPprint(tr planr.TestResult, opt PrintOpts) {
if tc.Config.Points != nil && opt.HasFlag(PRINT_POINTS) {
points := fmt.Sprintf("%.1f", *tc.Config.Points)
- pprintLabeled("points1", points)
+ pprintLabeled("points", points)
}
if tc.Config.Description != "" && opt.HasFlag(PRINT_DESCRIPTION) {
diff --git a/version.go b/version.go
index 54c1d83..6a63ced 100644
--- a/version.go
+++ b/version.go
@@ -1,3 +1,3 @@
package planr
-const VERSION = "0.1.3"
+const VERSION = "0.1.4"