Skip to content

Commit 6891405

Browse files
dmitshuraclements
authored andcommitted
cmd/dist: use "pkg[:variant]" as dist test name
The work to add the -json flag to the 'dist test' command also cleaned how dist tests are tracked and registered. By now, a pair of (import path, variant) strings is sufficient to uniquely identify every dist test that exists. Some of the custom dist test names have been improved along the way. And since the names are already changing a little anyway, we use this opportunity to make them more uniform and predictable. The mapping from the old dist test names to the new is as follows: - "go_test:pkg" → "pkg" (this is the most common case) - "go_test_bench:pkg" → "pkg:racebench" - all other custom names are now called "pkg:variant", where variant is a description of their test configuration and pkg is the import path of the Go package under test CL 495016 introduced test variants and used variant names for rewriting the Package field in JSON events, and now that same name starts to also be used as the dist test name. Like previously done in CL 494496, registering a test variant involving multiple Go packages creates a "pkg:variant" dist test name for each. In the future we may combine their 'go test' invocation purely as an optimization. We can do this with the support of CL 496190 that keeps the coordinator happy and capable of working with both new and old names. In the end, all dist tests now have a consistent "pkg[:variant]" name. For #37486. For #59990. Change-Id: I7eb02a42792a9831a2f3eeab583ff635d24269e8 Co-authored-by: Austin Clements <austin@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/496181 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
1 parent fe78663 commit 6891405

File tree

1 file changed

+113
-97
lines changed

1 file changed

+113
-97
lines changed

0 commit comments

Comments
 (0)