mirror of
https://github.com/golang/go
synced 2024-11-18 05:44:47 -07:00
cmd/test2json: attribute output to the correct test
When printing regular test output check the indentation of the output, and use
the report stack to find the appropriate test name for that output.
This change includes a whitespace change to some golden test files. The
indentation of tests was changed in CL 113177
from tabs to spaces. The golden files have been updated to match the new
output format. The tabs in the golden files cause problems because the indentation check
looks for 4 spaces.
Fixes #29755
Updates #25369
Change-Id: Iebab51816a9755168083a7a665b41497e9dfd85f
GitHub-Last-Rev: 898827f1a6
GitHub-Pull-Request: golang/go#34419
Reviewed-on: https://go-review.googlesource.com/c/go/+/196617
Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
parent
eecc6282cc
commit
f8662a5a96
@ -211,8 +211,18 @@ func (c *converter) handleInputLine(line []byte) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Not a special test output line.
|
||||||
if !ok {
|
if !ok {
|
||||||
// Not a special test output line.
|
// Lookup the name of the test which produced the output using the
|
||||||
|
// indentation of the output as an index into the stack of the current
|
||||||
|
// subtests.
|
||||||
|
// If the indentation is greater than the number of current subtests
|
||||||
|
// then the output must have included extra indentation. We can't
|
||||||
|
// determine which subtest produced this output, so we default to the
|
||||||
|
// old behaviour of assuming the most recently run subtest produced it.
|
||||||
|
if indent > 0 && indent <= len(c.report) {
|
||||||
|
c.testName = c.report[indent-1].Test
|
||||||
|
}
|
||||||
c.output.write(origLine)
|
c.output.write(origLine)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
38
src/cmd/internal/test2json/testdata/issue29755.json
vendored
Normal file
38
src/cmd/internal/test2json/testdata/issue29755.json
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{"Action":"run","Test":"TestOutputWithSubtest"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest","Output":"=== RUN TestOutputWithSubtest\n"}
|
||||||
|
{"Action":"run","Test":"TestOutputWithSubtest/sub_test"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest/sub_test","Output":"=== RUN TestOutputWithSubtest/sub_test\n"}
|
||||||
|
{"Action":"run","Test":"TestOutputWithSubtest/sub_test/sub2"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest/sub_test/sub2","Output":"=== RUN TestOutputWithSubtest/sub_test/sub2\n"}
|
||||||
|
{"Action":"run","Test":"TestOutputWithSubtest/sub_test2"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest/sub_test2","Output":"=== RUN TestOutputWithSubtest/sub_test2\n"}
|
||||||
|
{"Action":"run","Test":"TestOutputWithSubtest/sub_test2/sub2"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest/sub_test2/sub2","Output":"=== RUN TestOutputWithSubtest/sub_test2/sub2\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest","Output":"--- FAIL: TestOutputWithSubtest (0.00s)\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest","Output":" foo_test.go:6: output before sub tests\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest","Output":" foo_test.go:10: output from root test\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest","Output":" foo_test.go:15: output from root test\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest/sub_test","Output":" --- PASS: TestOutputWithSubtest/sub_test (0.00s)\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest/sub_test","Output":" foo_test.go:9: output from sub test\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest/sub_test","Output":" foo_test.go:11: more output from sub test\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest/sub_test","Output":" foo_test.go:16: more output from sub test\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest/sub_test/sub2","Output":" --- PASS: TestOutputWithSubtest/sub_test/sub2 (0.00s)\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest/sub_test/sub2","Output":" foo_test.go:14: output from sub2 test\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest","Output":" foo_test.go:22: output from root test\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest","Output":" foo_test.go:27: output from root test\n"}
|
||||||
|
{"Action":"pass","Test":"TestOutputWithSubtest/sub_test/sub2"}
|
||||||
|
{"Action":"pass","Test":"TestOutputWithSubtest/sub_test"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest/sub_test2","Output":" --- PASS: TestOutputWithSubtest/sub_test2 (0.00s)\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest/sub_test2","Output":" foo_test.go:21: output from sub test2\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest/sub_test2","Output":" foo_test.go:23: more output from sub test2\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest/sub_test2","Output":" foo_test.go:28: more output from sub test2\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest/sub_test2/sub2","Output":" --- PASS: TestOutputWithSubtest/sub_test2/sub2 (0.00s)\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest/sub_test2/sub2","Output":" foo_test.go:26: output from sub2 test\n"}
|
||||||
|
{"Action":"output","Test":"TestOutputWithSubtest","Output":" foo_test.go:32: output after sub test\n"}
|
||||||
|
{"Action":"pass","Test":"TestOutputWithSubtest/sub_test2/sub2"}
|
||||||
|
{"Action":"pass","Test":"TestOutputWithSubtest/sub_test2"}
|
||||||
|
{"Action":"fail","Test":"TestOutputWithSubtest"}
|
||||||
|
{"Action":"output","Output":"FAIL\n"}
|
||||||
|
{"Action":"output","Output":"FAIL\tgotest.tools/gotestsum/foo\t0.001s\n"}
|
||||||
|
{"Action":"output","Output":"FAIL\n"}
|
||||||
|
{"Action":"fail"}
|
27
src/cmd/internal/test2json/testdata/issue29755.test
vendored
Normal file
27
src/cmd/internal/test2json/testdata/issue29755.test
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
=== RUN TestOutputWithSubtest
|
||||||
|
=== RUN TestOutputWithSubtest/sub_test
|
||||||
|
=== RUN TestOutputWithSubtest/sub_test/sub2
|
||||||
|
=== RUN TestOutputWithSubtest/sub_test2
|
||||||
|
=== RUN TestOutputWithSubtest/sub_test2/sub2
|
||||||
|
--- FAIL: TestOutputWithSubtest (0.00s)
|
||||||
|
foo_test.go:6: output before sub tests
|
||||||
|
foo_test.go:10: output from root test
|
||||||
|
foo_test.go:15: output from root test
|
||||||
|
--- PASS: TestOutputWithSubtest/sub_test (0.00s)
|
||||||
|
foo_test.go:9: output from sub test
|
||||||
|
foo_test.go:11: more output from sub test
|
||||||
|
foo_test.go:16: more output from sub test
|
||||||
|
--- PASS: TestOutputWithSubtest/sub_test/sub2 (0.00s)
|
||||||
|
foo_test.go:14: output from sub2 test
|
||||||
|
foo_test.go:22: output from root test
|
||||||
|
foo_test.go:27: output from root test
|
||||||
|
--- PASS: TestOutputWithSubtest/sub_test2 (0.00s)
|
||||||
|
foo_test.go:21: output from sub test2
|
||||||
|
foo_test.go:23: more output from sub test2
|
||||||
|
foo_test.go:28: more output from sub test2
|
||||||
|
--- PASS: TestOutputWithSubtest/sub_test2/sub2 (0.00s)
|
||||||
|
foo_test.go:26: output from sub2 test
|
||||||
|
foo_test.go:32: output after sub test
|
||||||
|
FAIL
|
||||||
|
FAIL gotest.tools/gotestsum/foo 0.001s
|
||||||
|
FAIL
|
22
src/cmd/internal/test2json/testdata/smiley.json
vendored
22
src/cmd/internal/test2json/testdata/smiley.json
vendored
@ -116,13 +116,13 @@
|
|||||||
{"Action":"output","Test":"Test☺☹/2","Output":"=== CONT Test☺☹/2\n"}
|
{"Action":"output","Test":"Test☺☹/2","Output":"=== CONT Test☺☹/2\n"}
|
||||||
{"Action":"output","Test":"TestTags","Output":"--- PASS: TestTags (0.00s)\n"}
|
{"Action":"output","Test":"TestTags","Output":"--- PASS: TestTags (0.00s)\n"}
|
||||||
{"Action":"output","Test":"TestTags/x_testtag_y","Output":" --- PASS: TestTags/x_testtag_y (0.04s)\n"}
|
{"Action":"output","Test":"TestTags/x_testtag_y","Output":" --- PASS: TestTags/x_testtag_y (0.04s)\n"}
|
||||||
{"Action":"output","Test":"TestTags/x_testtag_y","Output":" \tvet_test.go:187: -tags=x testtag y\n"}
|
{"Action":"output","Test":"TestTags/x_testtag_y","Output":" vet_test.go:187: -tags=x testtag y\n"}
|
||||||
{"Action":"pass","Test":"TestTags/x_testtag_y"}
|
{"Action":"pass","Test":"TestTags/x_testtag_y"}
|
||||||
{"Action":"output","Test":"TestTags/x,testtag,y","Output":" --- PASS: TestTags/x,testtag,y (0.04s)\n"}
|
{"Action":"output","Test":"TestTags/x,testtag,y","Output":" --- PASS: TestTags/x,testtag,y (0.04s)\n"}
|
||||||
{"Action":"output","Test":"TestTags/x,testtag,y","Output":" \tvet_test.go:187: -tags=x,testtag,y\n"}
|
{"Action":"output","Test":"TestTags/x,testtag,y","Output":" vet_test.go:187: -tags=x,testtag,y\n"}
|
||||||
{"Action":"pass","Test":"TestTags/x,testtag,y"}
|
{"Action":"pass","Test":"TestTags/x,testtag,y"}
|
||||||
{"Action":"output","Test":"TestTags/testtag","Output":" --- PASS: TestTags/testtag (0.04s)\n"}
|
{"Action":"output","Test":"TestTags/testtag","Output":" --- PASS: TestTags/testtag (0.04s)\n"}
|
||||||
{"Action":"output","Test":"TestTags/testtag","Output":" \tvet_test.go:187: -tags=testtag\n"}
|
{"Action":"output","Test":"TestTags/testtag","Output":" vet_test.go:187: -tags=testtag\n"}
|
||||||
{"Action":"pass","Test":"TestTags/testtag"}
|
{"Action":"pass","Test":"TestTags/testtag"}
|
||||||
{"Action":"pass","Test":"TestTags"}
|
{"Action":"pass","Test":"TestTags"}
|
||||||
{"Action":"cont","Test":"Test☺☹/1"}
|
{"Action":"cont","Test":"Test☺☹/1"}
|
||||||
@ -139,28 +139,28 @@
|
|||||||
{"Action":"output","Test":"Test☺☹Dirs/cgo","Output":"=== CONT Test☺☹Dirs/cgo\n"}
|
{"Action":"output","Test":"Test☺☹Dirs/cgo","Output":"=== CONT Test☺☹Dirs/cgo\n"}
|
||||||
{"Action":"output","Test":"Test☺☹","Output":"--- PASS: Test☺☹ (0.39s)\n"}
|
{"Action":"output","Test":"Test☺☹","Output":"--- PASS: Test☺☹ (0.39s)\n"}
|
||||||
{"Action":"output","Test":"Test☺☹/5","Output":" --- PASS: Test☺☹/5 (0.07s)\n"}
|
{"Action":"output","Test":"Test☺☹/5","Output":" --- PASS: Test☺☹/5 (0.07s)\n"}
|
||||||
{"Action":"output","Test":"Test☺☹/5","Output":" \tvet_test.go:114: φιλεσ: [\"testdata/copylock_func.go\" \"testdata/rangeloop.go\"]\n"}
|
{"Action":"output","Test":"Test☺☹/5","Output":" vet_test.go:114: φιλεσ: [\"testdata/copylock_func.go\" \"testdata/rangeloop.go\"]\n"}
|
||||||
{"Action":"pass","Test":"Test☺☹/5"}
|
{"Action":"pass","Test":"Test☺☹/5"}
|
||||||
{"Action":"output","Test":"Test☺☹/3","Output":" --- PASS: Test☺☹/3 (0.07s)\n"}
|
{"Action":"output","Test":"Test☺☹/3","Output":" --- PASS: Test☺☹/3 (0.07s)\n"}
|
||||||
{"Action":"output","Test":"Test☺☹/3","Output":" \tvet_test.go:114: φιλεσ: [\"testdata/composite.go\" \"testdata/nilfunc.go\"]\n"}
|
{"Action":"output","Test":"Test☺☹/3","Output":" vet_test.go:114: φιλεσ: [\"testdata/composite.go\" \"testdata/nilfunc.go\"]\n"}
|
||||||
{"Action":"pass","Test":"Test☺☹/3"}
|
{"Action":"pass","Test":"Test☺☹/3"}
|
||||||
{"Action":"output","Test":"Test☺☹/6","Output":" --- PASS: Test☺☹/6 (0.07s)\n"}
|
{"Action":"output","Test":"Test☺☹/6","Output":" --- PASS: Test☺☹/6 (0.07s)\n"}
|
||||||
{"Action":"output","Test":"Test☺☹/6","Output":" \tvet_test.go:114: φιλεσ: [\"testdata/copylock_range.go\" \"testdata/shadow.go\"]\n"}
|
{"Action":"output","Test":"Test☺☹/6","Output":" vet_test.go:114: φιλεσ: [\"testdata/copylock_range.go\" \"testdata/shadow.go\"]\n"}
|
||||||
{"Action":"pass","Test":"Test☺☹/6"}
|
{"Action":"pass","Test":"Test☺☹/6"}
|
||||||
{"Action":"output","Test":"Test☺☹/2","Output":" --- PASS: Test☺☹/2 (0.07s)\n"}
|
{"Action":"output","Test":"Test☺☹/2","Output":" --- PASS: Test☺☹/2 (0.07s)\n"}
|
||||||
{"Action":"output","Test":"Test☺☹/2","Output":" \tvet_test.go:114: φιλεσ: [\"testdata/bool.go\" \"testdata/method.go\" \"testdata/unused.go\"]\n"}
|
{"Action":"output","Test":"Test☺☹/2","Output":" vet_test.go:114: φιλεσ: [\"testdata/bool.go\" \"testdata/method.go\" \"testdata/unused.go\"]\n"}
|
||||||
{"Action":"pass","Test":"Test☺☹/2"}
|
{"Action":"pass","Test":"Test☺☹/2"}
|
||||||
{"Action":"output","Test":"Test☺☹/0","Output":" --- PASS: Test☺☹/0 (0.13s)\n"}
|
{"Action":"output","Test":"Test☺☹/0","Output":" --- PASS: Test☺☹/0 (0.13s)\n"}
|
||||||
{"Action":"output","Test":"Test☺☹/0","Output":" \tvet_test.go:114: φιλεσ: [\"testdata/assign.go\" \"testdata/httpresponse.go\" \"testdata/structtag.go\"]\n"}
|
{"Action":"output","Test":"Test☺☹/0","Output":" vet_test.go:114: φιλεσ: [\"testdata/assign.go\" \"testdata/httpresponse.go\" \"testdata/structtag.go\"]\n"}
|
||||||
{"Action":"pass","Test":"Test☺☹/0"}
|
{"Action":"pass","Test":"Test☺☹/0"}
|
||||||
{"Action":"output","Test":"Test☺☹/4","Output":" --- PASS: Test☺☹/4 (0.16s)\n"}
|
{"Action":"output","Test":"Test☺☹/4","Output":" --- PASS: Test☺☹/4 (0.16s)\n"}
|
||||||
{"Action":"output","Test":"Test☺☹/4","Output":" \tvet_test.go:114: φιλεσ: [\"testdata/copylock.go\" \"testdata/print.go\"]\n"}
|
{"Action":"output","Test":"Test☺☹/4","Output":" vet_test.go:114: φιλεσ: [\"testdata/copylock.go\" \"testdata/print.go\"]\n"}
|
||||||
{"Action":"pass","Test":"Test☺☹/4"}
|
{"Action":"pass","Test":"Test☺☹/4"}
|
||||||
{"Action":"output","Test":"Test☺☹/1","Output":" --- PASS: Test☺☹/1 (0.07s)\n"}
|
{"Action":"output","Test":"Test☺☹/1","Output":" --- PASS: Test☺☹/1 (0.07s)\n"}
|
||||||
{"Action":"output","Test":"Test☺☹/1","Output":" \tvet_test.go:114: φιλεσ: [\"testdata/atomic.go\" \"testdata/lostcancel.go\" \"testdata/unsafeptr.go\"]\n"}
|
{"Action":"output","Test":"Test☺☹/1","Output":" vet_test.go:114: φιλεσ: [\"testdata/atomic.go\" \"testdata/lostcancel.go\" \"testdata/unsafeptr.go\"]\n"}
|
||||||
{"Action":"pass","Test":"Test☺☹/1"}
|
{"Action":"pass","Test":"Test☺☹/1"}
|
||||||
{"Action":"output","Test":"Test☺☹/7","Output":" --- PASS: Test☺☹/7 (0.19s)\n"}
|
{"Action":"output","Test":"Test☺☹/7","Output":" --- PASS: Test☺☹/7 (0.19s)\n"}
|
||||||
{"Action":"output","Test":"Test☺☹/7","Output":" \tvet_test.go:114: φιλεσ: [\"testdata/deadcode.go\" \"testdata/shift.go\"]\n"}
|
{"Action":"output","Test":"Test☺☹/7","Output":" vet_test.go:114: φιλεσ: [\"testdata/deadcode.go\" \"testdata/shift.go\"]\n"}
|
||||||
{"Action":"pass","Test":"Test☺☹/7"}
|
{"Action":"pass","Test":"Test☺☹/7"}
|
||||||
{"Action":"pass","Test":"Test☺☹"}
|
{"Action":"pass","Test":"Test☺☹"}
|
||||||
{"Action":"output","Test":"Test☺☹Dirs","Output":"--- PASS: Test☺☹Dirs (0.01s)\n"}
|
{"Action":"output","Test":"Test☺☹Dirs","Output":"--- PASS: Test☺☹Dirs (0.01s)\n"}
|
||||||
|
22
src/cmd/internal/test2json/testdata/smiley.test
vendored
22
src/cmd/internal/test2json/testdata/smiley.test
vendored
@ -58,11 +58,11 @@
|
|||||||
=== CONT Test☺☹/2
|
=== CONT Test☺☹/2
|
||||||
--- PASS: TestTags (0.00s)
|
--- PASS: TestTags (0.00s)
|
||||||
--- PASS: TestTags/x_testtag_y (0.04s)
|
--- PASS: TestTags/x_testtag_y (0.04s)
|
||||||
vet_test.go:187: -tags=x testtag y
|
vet_test.go:187: -tags=x testtag y
|
||||||
--- PASS: TestTags/x,testtag,y (0.04s)
|
--- PASS: TestTags/x,testtag,y (0.04s)
|
||||||
vet_test.go:187: -tags=x,testtag,y
|
vet_test.go:187: -tags=x,testtag,y
|
||||||
--- PASS: TestTags/testtag (0.04s)
|
--- PASS: TestTags/testtag (0.04s)
|
||||||
vet_test.go:187: -tags=testtag
|
vet_test.go:187: -tags=testtag
|
||||||
=== CONT Test☺☹/1
|
=== CONT Test☺☹/1
|
||||||
=== CONT Test☺☹Dirs/testingpkg
|
=== CONT Test☺☹Dirs/testingpkg
|
||||||
=== CONT Test☺☹Dirs/buildtag
|
=== CONT Test☺☹Dirs/buildtag
|
||||||
@ -71,21 +71,21 @@
|
|||||||
=== CONT Test☺☹Dirs/cgo
|
=== CONT Test☺☹Dirs/cgo
|
||||||
--- PASS: Test☺☹ (0.39s)
|
--- PASS: Test☺☹ (0.39s)
|
||||||
--- PASS: Test☺☹/5 (0.07s)
|
--- PASS: Test☺☹/5 (0.07s)
|
||||||
vet_test.go:114: φιλεσ: ["testdata/copylock_func.go" "testdata/rangeloop.go"]
|
vet_test.go:114: φιλεσ: ["testdata/copylock_func.go" "testdata/rangeloop.go"]
|
||||||
--- PASS: Test☺☹/3 (0.07s)
|
--- PASS: Test☺☹/3 (0.07s)
|
||||||
vet_test.go:114: φιλεσ: ["testdata/composite.go" "testdata/nilfunc.go"]
|
vet_test.go:114: φιλεσ: ["testdata/composite.go" "testdata/nilfunc.go"]
|
||||||
--- PASS: Test☺☹/6 (0.07s)
|
--- PASS: Test☺☹/6 (0.07s)
|
||||||
vet_test.go:114: φιλεσ: ["testdata/copylock_range.go" "testdata/shadow.go"]
|
vet_test.go:114: φιλεσ: ["testdata/copylock_range.go" "testdata/shadow.go"]
|
||||||
--- PASS: Test☺☹/2 (0.07s)
|
--- PASS: Test☺☹/2 (0.07s)
|
||||||
vet_test.go:114: φιλεσ: ["testdata/bool.go" "testdata/method.go" "testdata/unused.go"]
|
vet_test.go:114: φιλεσ: ["testdata/bool.go" "testdata/method.go" "testdata/unused.go"]
|
||||||
--- PASS: Test☺☹/0 (0.13s)
|
--- PASS: Test☺☹/0 (0.13s)
|
||||||
vet_test.go:114: φιλεσ: ["testdata/assign.go" "testdata/httpresponse.go" "testdata/structtag.go"]
|
vet_test.go:114: φιλεσ: ["testdata/assign.go" "testdata/httpresponse.go" "testdata/structtag.go"]
|
||||||
--- PASS: Test☺☹/4 (0.16s)
|
--- PASS: Test☺☹/4 (0.16s)
|
||||||
vet_test.go:114: φιλεσ: ["testdata/copylock.go" "testdata/print.go"]
|
vet_test.go:114: φιλεσ: ["testdata/copylock.go" "testdata/print.go"]
|
||||||
--- PASS: Test☺☹/1 (0.07s)
|
--- PASS: Test☺☹/1 (0.07s)
|
||||||
vet_test.go:114: φιλεσ: ["testdata/atomic.go" "testdata/lostcancel.go" "testdata/unsafeptr.go"]
|
vet_test.go:114: φιλεσ: ["testdata/atomic.go" "testdata/lostcancel.go" "testdata/unsafeptr.go"]
|
||||||
--- PASS: Test☺☹/7 (0.19s)
|
--- PASS: Test☺☹/7 (0.19s)
|
||||||
vet_test.go:114: φιλεσ: ["testdata/deadcode.go" "testdata/shift.go"]
|
vet_test.go:114: φιλεσ: ["testdata/deadcode.go" "testdata/shift.go"]
|
||||||
--- PASS: Test☺☹Dirs (0.01s)
|
--- PASS: Test☺☹Dirs (0.01s)
|
||||||
--- PASS: Test☺☹Dirs/testingpkg (0.06s)
|
--- PASS: Test☺☹Dirs/testingpkg (0.06s)
|
||||||
--- PASS: Test☺☹Dirs/divergent (0.05s)
|
--- PASS: Test☺☹Dirs/divergent (0.05s)
|
||||||
|
22
src/cmd/internal/test2json/testdata/vet.json
vendored
22
src/cmd/internal/test2json/testdata/vet.json
vendored
@ -116,13 +116,13 @@
|
|||||||
{"Action":"output","Test":"TestVet/2","Output":"=== CONT TestVet/2\n"}
|
{"Action":"output","Test":"TestVet/2","Output":"=== CONT TestVet/2\n"}
|
||||||
{"Action":"output","Test":"TestTags","Output":"--- PASS: TestTags (0.00s)\n"}
|
{"Action":"output","Test":"TestTags","Output":"--- PASS: TestTags (0.00s)\n"}
|
||||||
{"Action":"output","Test":"TestTags/x_testtag_y","Output":" --- PASS: TestTags/x_testtag_y (0.04s)\n"}
|
{"Action":"output","Test":"TestTags/x_testtag_y","Output":" --- PASS: TestTags/x_testtag_y (0.04s)\n"}
|
||||||
{"Action":"output","Test":"TestTags/x_testtag_y","Output":" \tvet_test.go:187: -tags=x testtag y\n"}
|
{"Action":"output","Test":"TestTags/x_testtag_y","Output":" vet_test.go:187: -tags=x testtag y\n"}
|
||||||
{"Action":"pass","Test":"TestTags/x_testtag_y"}
|
{"Action":"pass","Test":"TestTags/x_testtag_y"}
|
||||||
{"Action":"output","Test":"TestTags/x,testtag,y","Output":" --- PASS: TestTags/x,testtag,y (0.04s)\n"}
|
{"Action":"output","Test":"TestTags/x,testtag,y","Output":" --- PASS: TestTags/x,testtag,y (0.04s)\n"}
|
||||||
{"Action":"output","Test":"TestTags/x,testtag,y","Output":" \tvet_test.go:187: -tags=x,testtag,y\n"}
|
{"Action":"output","Test":"TestTags/x,testtag,y","Output":" vet_test.go:187: -tags=x,testtag,y\n"}
|
||||||
{"Action":"pass","Test":"TestTags/x,testtag,y"}
|
{"Action":"pass","Test":"TestTags/x,testtag,y"}
|
||||||
{"Action":"output","Test":"TestTags/testtag","Output":" --- PASS: TestTags/testtag (0.04s)\n"}
|
{"Action":"output","Test":"TestTags/testtag","Output":" --- PASS: TestTags/testtag (0.04s)\n"}
|
||||||
{"Action":"output","Test":"TestTags/testtag","Output":" \tvet_test.go:187: -tags=testtag\n"}
|
{"Action":"output","Test":"TestTags/testtag","Output":" vet_test.go:187: -tags=testtag\n"}
|
||||||
{"Action":"pass","Test":"TestTags/testtag"}
|
{"Action":"pass","Test":"TestTags/testtag"}
|
||||||
{"Action":"pass","Test":"TestTags"}
|
{"Action":"pass","Test":"TestTags"}
|
||||||
{"Action":"cont","Test":"TestVet/1"}
|
{"Action":"cont","Test":"TestVet/1"}
|
||||||
@ -139,28 +139,28 @@
|
|||||||
{"Action":"output","Test":"TestVetDirs/cgo","Output":"=== CONT TestVetDirs/cgo\n"}
|
{"Action":"output","Test":"TestVetDirs/cgo","Output":"=== CONT TestVetDirs/cgo\n"}
|
||||||
{"Action":"output","Test":"TestVet","Output":"--- PASS: TestVet (0.39s)\n"}
|
{"Action":"output","Test":"TestVet","Output":"--- PASS: TestVet (0.39s)\n"}
|
||||||
{"Action":"output","Test":"TestVet/5","Output":" --- PASS: TestVet/5 (0.07s)\n"}
|
{"Action":"output","Test":"TestVet/5","Output":" --- PASS: TestVet/5 (0.07s)\n"}
|
||||||
{"Action":"output","Test":"TestVet/5","Output":" \tvet_test.go:114: files: [\"testdata/copylock_func.go\" \"testdata/rangeloop.go\"]\n"}
|
{"Action":"output","Test":"TestVet/5","Output":" vet_test.go:114: files: [\"testdata/copylock_func.go\" \"testdata/rangeloop.go\"]\n"}
|
||||||
{"Action":"pass","Test":"TestVet/5"}
|
{"Action":"pass","Test":"TestVet/5"}
|
||||||
{"Action":"output","Test":"TestVet/3","Output":" --- PASS: TestVet/3 (0.07s)\n"}
|
{"Action":"output","Test":"TestVet/3","Output":" --- PASS: TestVet/3 (0.07s)\n"}
|
||||||
{"Action":"output","Test":"TestVet/3","Output":" \tvet_test.go:114: files: [\"testdata/composite.go\" \"testdata/nilfunc.go\"]\n"}
|
{"Action":"output","Test":"TestVet/3","Output":" vet_test.go:114: files: [\"testdata/composite.go\" \"testdata/nilfunc.go\"]\n"}
|
||||||
{"Action":"pass","Test":"TestVet/3"}
|
{"Action":"pass","Test":"TestVet/3"}
|
||||||
{"Action":"output","Test":"TestVet/6","Output":" --- PASS: TestVet/6 (0.07s)\n"}
|
{"Action":"output","Test":"TestVet/6","Output":" --- PASS: TestVet/6 (0.07s)\n"}
|
||||||
{"Action":"output","Test":"TestVet/6","Output":" \tvet_test.go:114: files: [\"testdata/copylock_range.go\" \"testdata/shadow.go\"]\n"}
|
{"Action":"output","Test":"TestVet/6","Output":" vet_test.go:114: files: [\"testdata/copylock_range.go\" \"testdata/shadow.go\"]\n"}
|
||||||
{"Action":"pass","Test":"TestVet/6"}
|
{"Action":"pass","Test":"TestVet/6"}
|
||||||
{"Action":"output","Test":"TestVet/2","Output":" --- PASS: TestVet/2 (0.07s)\n"}
|
{"Action":"output","Test":"TestVet/2","Output":" --- PASS: TestVet/2 (0.07s)\n"}
|
||||||
{"Action":"output","Test":"TestVet/2","Output":" \tvet_test.go:114: files: [\"testdata/bool.go\" \"testdata/method.go\" \"testdata/unused.go\"]\n"}
|
{"Action":"output","Test":"TestVet/2","Output":" vet_test.go:114: files: [\"testdata/bool.go\" \"testdata/method.go\" \"testdata/unused.go\"]\n"}
|
||||||
{"Action":"pass","Test":"TestVet/2"}
|
{"Action":"pass","Test":"TestVet/2"}
|
||||||
{"Action":"output","Test":"TestVet/0","Output":" --- PASS: TestVet/0 (0.13s)\n"}
|
{"Action":"output","Test":"TestVet/0","Output":" --- PASS: TestVet/0 (0.13s)\n"}
|
||||||
{"Action":"output","Test":"TestVet/0","Output":" \tvet_test.go:114: files: [\"testdata/assign.go\" \"testdata/httpresponse.go\" \"testdata/structtag.go\"]\n"}
|
{"Action":"output","Test":"TestVet/0","Output":" vet_test.go:114: files: [\"testdata/assign.go\" \"testdata/httpresponse.go\" \"testdata/structtag.go\"]\n"}
|
||||||
{"Action":"pass","Test":"TestVet/0"}
|
{"Action":"pass","Test":"TestVet/0"}
|
||||||
{"Action":"output","Test":"TestVet/4","Output":" --- PASS: TestVet/4 (0.16s)\n"}
|
{"Action":"output","Test":"TestVet/4","Output":" --- PASS: TestVet/4 (0.16s)\n"}
|
||||||
{"Action":"output","Test":"TestVet/4","Output":" \tvet_test.go:114: files: [\"testdata/copylock.go\" \"testdata/print.go\"]\n"}
|
{"Action":"output","Test":"TestVet/4","Output":" vet_test.go:114: files: [\"testdata/copylock.go\" \"testdata/print.go\"]\n"}
|
||||||
{"Action":"pass","Test":"TestVet/4"}
|
{"Action":"pass","Test":"TestVet/4"}
|
||||||
{"Action":"output","Test":"TestVet/1","Output":" --- PASS: TestVet/1 (0.07s)\n"}
|
{"Action":"output","Test":"TestVet/1","Output":" --- PASS: TestVet/1 (0.07s)\n"}
|
||||||
{"Action":"output","Test":"TestVet/1","Output":" \tvet_test.go:114: files: [\"testdata/atomic.go\" \"testdata/lostcancel.go\" \"testdata/unsafeptr.go\"]\n"}
|
{"Action":"output","Test":"TestVet/1","Output":" vet_test.go:114: files: [\"testdata/atomic.go\" \"testdata/lostcancel.go\" \"testdata/unsafeptr.go\"]\n"}
|
||||||
{"Action":"pass","Test":"TestVet/1"}
|
{"Action":"pass","Test":"TestVet/1"}
|
||||||
{"Action":"output","Test":"TestVet/7","Output":" --- PASS: TestVet/7 (0.19s)\n"}
|
{"Action":"output","Test":"TestVet/7","Output":" --- PASS: TestVet/7 (0.19s)\n"}
|
||||||
{"Action":"output","Test":"TestVet/7","Output":" \tvet_test.go:114: files: [\"testdata/deadcode.go\" \"testdata/shift.go\"]\n"}
|
{"Action":"output","Test":"TestVet/7","Output":" vet_test.go:114: files: [\"testdata/deadcode.go\" \"testdata/shift.go\"]\n"}
|
||||||
{"Action":"pass","Test":"TestVet/7"}
|
{"Action":"pass","Test":"TestVet/7"}
|
||||||
{"Action":"pass","Test":"TestVet"}
|
{"Action":"pass","Test":"TestVet"}
|
||||||
{"Action":"output","Test":"TestVetDirs","Output":"--- PASS: TestVetDirs (0.01s)\n"}
|
{"Action":"output","Test":"TestVetDirs","Output":"--- PASS: TestVetDirs (0.01s)\n"}
|
||||||
|
22
src/cmd/internal/test2json/testdata/vet.test
vendored
22
src/cmd/internal/test2json/testdata/vet.test
vendored
@ -58,11 +58,11 @@
|
|||||||
=== CONT TestVet/2
|
=== CONT TestVet/2
|
||||||
--- PASS: TestTags (0.00s)
|
--- PASS: TestTags (0.00s)
|
||||||
--- PASS: TestTags/x_testtag_y (0.04s)
|
--- PASS: TestTags/x_testtag_y (0.04s)
|
||||||
vet_test.go:187: -tags=x testtag y
|
vet_test.go:187: -tags=x testtag y
|
||||||
--- PASS: TestTags/x,testtag,y (0.04s)
|
--- PASS: TestTags/x,testtag,y (0.04s)
|
||||||
vet_test.go:187: -tags=x,testtag,y
|
vet_test.go:187: -tags=x,testtag,y
|
||||||
--- PASS: TestTags/testtag (0.04s)
|
--- PASS: TestTags/testtag (0.04s)
|
||||||
vet_test.go:187: -tags=testtag
|
vet_test.go:187: -tags=testtag
|
||||||
=== CONT TestVet/1
|
=== CONT TestVet/1
|
||||||
=== CONT TestVetDirs/testingpkg
|
=== CONT TestVetDirs/testingpkg
|
||||||
=== CONT TestVetDirs/buildtag
|
=== CONT TestVetDirs/buildtag
|
||||||
@ -71,21 +71,21 @@
|
|||||||
=== CONT TestVetDirs/cgo
|
=== CONT TestVetDirs/cgo
|
||||||
--- PASS: TestVet (0.39s)
|
--- PASS: TestVet (0.39s)
|
||||||
--- PASS: TestVet/5 (0.07s)
|
--- PASS: TestVet/5 (0.07s)
|
||||||
vet_test.go:114: files: ["testdata/copylock_func.go" "testdata/rangeloop.go"]
|
vet_test.go:114: files: ["testdata/copylock_func.go" "testdata/rangeloop.go"]
|
||||||
--- PASS: TestVet/3 (0.07s)
|
--- PASS: TestVet/3 (0.07s)
|
||||||
vet_test.go:114: files: ["testdata/composite.go" "testdata/nilfunc.go"]
|
vet_test.go:114: files: ["testdata/composite.go" "testdata/nilfunc.go"]
|
||||||
--- PASS: TestVet/6 (0.07s)
|
--- PASS: TestVet/6 (0.07s)
|
||||||
vet_test.go:114: files: ["testdata/copylock_range.go" "testdata/shadow.go"]
|
vet_test.go:114: files: ["testdata/copylock_range.go" "testdata/shadow.go"]
|
||||||
--- PASS: TestVet/2 (0.07s)
|
--- PASS: TestVet/2 (0.07s)
|
||||||
vet_test.go:114: files: ["testdata/bool.go" "testdata/method.go" "testdata/unused.go"]
|
vet_test.go:114: files: ["testdata/bool.go" "testdata/method.go" "testdata/unused.go"]
|
||||||
--- PASS: TestVet/0 (0.13s)
|
--- PASS: TestVet/0 (0.13s)
|
||||||
vet_test.go:114: files: ["testdata/assign.go" "testdata/httpresponse.go" "testdata/structtag.go"]
|
vet_test.go:114: files: ["testdata/assign.go" "testdata/httpresponse.go" "testdata/structtag.go"]
|
||||||
--- PASS: TestVet/4 (0.16s)
|
--- PASS: TestVet/4 (0.16s)
|
||||||
vet_test.go:114: files: ["testdata/copylock.go" "testdata/print.go"]
|
vet_test.go:114: files: ["testdata/copylock.go" "testdata/print.go"]
|
||||||
--- PASS: TestVet/1 (0.07s)
|
--- PASS: TestVet/1 (0.07s)
|
||||||
vet_test.go:114: files: ["testdata/atomic.go" "testdata/lostcancel.go" "testdata/unsafeptr.go"]
|
vet_test.go:114: files: ["testdata/atomic.go" "testdata/lostcancel.go" "testdata/unsafeptr.go"]
|
||||||
--- PASS: TestVet/7 (0.19s)
|
--- PASS: TestVet/7 (0.19s)
|
||||||
vet_test.go:114: files: ["testdata/deadcode.go" "testdata/shift.go"]
|
vet_test.go:114: files: ["testdata/deadcode.go" "testdata/shift.go"]
|
||||||
--- PASS: TestVetDirs (0.01s)
|
--- PASS: TestVetDirs (0.01s)
|
||||||
--- PASS: TestVetDirs/testingpkg (0.06s)
|
--- PASS: TestVetDirs/testingpkg (0.06s)
|
||||||
--- PASS: TestVetDirs/divergent (0.05s)
|
--- PASS: TestVetDirs/divergent (0.05s)
|
||||||
|
Loading…
Reference in New Issue
Block a user