Commit c845547
committed
[release] src/goTest: remove '#' in subtest name parsing cutset
Subtests are detected dynamically - while running tests.
GoTestRunner heuristically builds subtest trees by parsing
the test names observed while running tests.
Before this CL, it used both '/' and '#' as the separator for
parsing. For example, it placed a test item for Foo as a
child of TestXxx when it observed TestXxx/Foo, and a test item
01 as a child of TestXxx if it saw TestXxx#01.
However, go test uses '#' to resolve conflicts in subtest names,
so it's not right to assume TestXXX#01 is a subtest of TestXXX.
Moreover, treating TestXXX/subtest#01 or TestXXX/subtest#02 as
a subtest of TestXXX/subtest confuses the text UI API because
`go test -json` will generate event sequence like
TestXXX run
TestXXX/subtest run
TestXXX/subtest#01 run
TestXXX/subtest#02 run
TestXXX/subtest pass
TestXXX/subtest#01 pass
TestXXX/subtest#02 pass
TestXXX pass
That causes the test UI to show only the last item for TestXXX/subtest#02
to appear in TestXXX/subtest's child.
This bug also makes Fuzz test's crasher and seed case listing confusing.
This CL removes '#' from the cutset.
Fixes #2023
For #1922
Change-Id: I33ba5c17e9095686a87c719d44fe7330269d9cc3
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/380501
Trust: Hyang-Ah Hana Kim <[email protected]>
Run-TryBot: Hyang-Ah Hana Kim <[email protected]>
TryBot-Result: kokoro <[email protected]>
Reviewed-by: Suzy Mueller <[email protected]>
(cherry picked from commit 2735f15)
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/383935
Reviewed-by: Robert Findley <[email protected]>1 parent 0e33c84 commit c845547
File tree
3 files changed
+13
-3
lines changed- src/goTest
- test
- integration
- testdata/subTest
3 files changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
481 | | - | |
| 480 | + | |
482 | 481 | | |
483 | 482 | | |
484 | 483 | | |
485 | 484 | | |
486 | 485 | | |
487 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
488 | 490 | | |
489 | 491 | | |
490 | 492 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
147 | 153 | | |
148 | 154 | | |
149 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
0 commit comments