Skip to content

Commit

Permalink
tools: fix built for ut tool (#56925)
Browse files Browse the repository at this point in the history
ref #55480
  • Loading branch information
hawkingrei authored Oct 29, 2024
1 parent 6085651 commit c32c7b2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ exports_files([
# gazelle:exclude build/linter/staticcheck
# gazelle:exclude vendor
# gazelle:exclude tools/patch-go
# gazelle:exclude tools/check
# gazelle:resolve go github.com/bazelbuild/buildtools/build @com_github_bazelbuild_buildtools//build:go_default_library
gazelle(name = "gazelle")

Expand Down
19 changes: 19 additions & 0 deletions tools/check/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")

go_library(
name = "ut_lib",
srcs = ["ut.go"],
importpath = "github.com/pingcap/tidb/cmd/tidb-server",
visibility = ["//visibility:private"],
deps = [
"@org_golang_x_tools//cover:go_default_library",
"@org_uber_go_automaxprocs//maxprocs",
],
)

go_library(
name = "xprog_lib",
srcs = ["xprog.go"],
importpath = "github.com/pingcap/tidb/cmd/tidb-server",
visibility = ["//visibility:private"],
)
2 changes: 1 addition & 1 deletion tools/check/ut.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ func cmdRun(args ...string) bool {
taskCh := make(chan task, 100)
works := make([]numa, p)
var wg sync.WaitGroup
for range p {
for i := range p {
wg.Add(1)
go works[i].worker(&wg, taskCh)
}
Expand Down

0 comments on commit c32c7b2

Please sign in to comment.