Skip to content

Commit

Permalink
Remove the extra newline between summary sections
Browse files Browse the repository at this point in the history
  • Loading branch information
dnephin committed Oct 11, 2020
1 parent 8efcfba commit 5c495de
Show file tree
Hide file tree
Showing 13 changed files with 2 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,4 @@ SEED: 3
=== FAIL: cmd/testdata/e2e/flaky TestFailsOften (re-run 2)
SEED: 4


DONE 3 runs, 14 tests, 8 failures
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,4 @@ SEED: 3
=== FAIL: cmd/testdata/e2e/flaky TestFailsOften (re-run 2)
SEED: 4


DONE 3 runs, 14 tests, 8 failures
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,4 @@ SEED: 4
=== FAIL: cmd/testdata/e2e/flaky TestFailsOften (re-run 3)
SEED: 5


DONE 5 runs, 18 tests, 10 failures
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,4 @@ SEED: 4
=== FAIL: cmd/testdata/e2e/flaky TestFailsOften (re-run 3)
SEED: 5


DONE 5 runs, 18 tests, 10 failures
4 changes: 2 additions & 2 deletions testjson/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func writeTestCaseSummary(out io.Writer, execution executionSummary, conf testCa
return
}
fmt.Fprintln(out, "\n=== "+conf.header)
for _, tc := range testCases {
for idx, tc := range testCases {
fmt.Fprintf(out, "=== %s: %s %s%s (%s)\n",
conf.prefix,
RelativePackagePath(tc.Package),
Expand All @@ -183,7 +183,7 @@ func writeTestCaseSummary(out io.Writer, execution executionSummary, conf testCa
}
fmt.Fprint(out, line)
}
if _, isNoOutput := execution.(*noOutputSummary); !isNoOutput {
if _, isNoOutput := execution.(*noOutputSummary); !isNoOutput && idx+1 != len(testCases) {
fmt.Fprintln(out)
}
}
Expand Down
2 changes: 0 additions & 2 deletions testjson/summary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ Some stdout/stderr here
=== SKIP: project/pkg/more TestOnlySometimes (0.00s)
good_test.go:27: the skip message
=== Failed
=== FAIL: project/badmain (0.00s)
sometimes main can exit 2
Expand All @@ -169,7 +168,6 @@ Some stdout/stderr here
=== FAIL: project/pkg/more TestAlbatross (0.04s)
=== Errors
pkg/file.go:99:12: missing ',' before newline
Expand Down
1 change: 0 additions & 1 deletion testjson/testdata/bug-missing-skip-message-summary.out
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ WARN Failed to detect terminal width for dots format, error: inappropriate ioctl
TestGetPkgPathPrefix/with_go_path: pkgpathprefix_test.go:22: isGoModuleEnabled()
--- SKIP: TestGetPkgPathPrefix/with_go_path (0.00s)


DONE 42 tests, 2 skipped in 0.000s
2 changes: 0 additions & 2 deletions testjson/testdata/bug-repeated-test-case-output.out
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
=== SKIP: github.com/gotestyourself/gotestyourself/testjson/internal/stub TestSkippedWitLog (0.00s)
stub_test.go:30: the skip message


=== Failed
=== FAIL: github.com/gotestyourself/gotestyourself/testjson/internal/badmain (0.00s)
sometimes main can exit 2
Expand Down Expand Up @@ -85,5 +84,4 @@ this is stderr

=== FAIL: github.com/gotestyourself/gotestyourself/testjson/internal/stub TestNestedWithFailure (0.00s)


DONE 138 tests, 12 skipped, 13 failures in 0.000s
1 change: 0 additions & 1 deletion testjson/testdata/summary-misattributed-output
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@
foo_test.go:26: output from sub2 test
foo_test.go:32: output after sub test


DONE 5 tests, 1 failure in 0.000s
1 change: 0 additions & 1 deletion testjson/testdata/summary-missing-test-fail-event
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ gotest.tools/v3/poll.WaitOn.func1(0xc00001e3c0, 0x67df50, 0x6c1960, 0xc00016c240
created by gotest.tools/v3/poll.WaitOn
/home/daniel/pers/code/gotest.tools/poll/poll.go:124 +0x16f


DONE 1 tests, 1 failure in 0.000s
1 change: 0 additions & 1 deletion testjson/testdata/summary-parallel-failures.out
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@
=== FAIL: testjson/internal/parallelfails TestParallelTheSecond (0.01s)
TestParallelTheSecond: fails_test.go:35: failed the second


DONE 12 tests, 8 failures in 0.000s
2 changes: 0 additions & 2 deletions testjson/testdata/summary-root-test-has-subtest-failures
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
=== SKIP: github.com/gotestyourself/gotestyourself/testjson/internal/stub TestSkippedWitLog (0.00s)
stub_test.go:30: the skip message


=== Failed
=== FAIL: github.com/gotestyourself/gotestyourself/testjson/internal/badmain (0.00s)
sometimes main can exit 2
Expand All @@ -31,5 +30,4 @@ this is stderr

=== FAIL: github.com/gotestyourself/gotestyourself/testjson/internal/stub TestNestedWithFailure (0.00s)


DONE 46 tests, 4 skipped, 5 failures in 0.000s
2 changes: 0 additions & 2 deletions testjson/testdata/summary-with-run-id.out
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
=== SKIP: github.com/gotestyourself/gotestyourself/testjson/internal/stub TestSkippedWitLog (re-run 7) (0.00s)
stub_test.go:30: the skip message


=== Failed
=== FAIL: github.com/gotestyourself/gotestyourself/testjson/internal/badmain (0.00s)
sometimes main can exit 2
Expand All @@ -31,5 +30,4 @@ this is stderr

=== FAIL: github.com/gotestyourself/gotestyourself/testjson/internal/stub TestNestedWithFailure (re-run 7) (0.00s)


DONE 8 runs, 46 tests, 4 skipped, 5 failures in 0.000s

0 comments on commit 5c495de

Please sign in to comment.