forked from pingcap/tiflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
420 lines (333 loc) · 15.9 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
### Makefile for ticdc
.PHONY: build test check clean fmt cdc kafka_consumer coverage \
integration_test_build integration_test integration_test_mysql integration_test_kafka bank \
dm dm-master dm-worker dmctl dm-portal dm-syncer dm_coverage
PROJECT=tiflow
P=3
FAIL_ON_STDOUT := awk '{ print } END { if (NR > 0) { exit 1 } }'
CURDIR := $(shell pwd)
path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(GOPATH)))
export PATH := $(CURDIR)/bin:$(path_to_add):$(PATH)
SHELL := /usr/bin/env bash
TEST_DIR := /tmp/tidb_cdc_test
DM_TEST_DIR := /tmp/dm_test
GO := GO111MODULE=on go
ifeq (${CDC_ENABLE_VENDOR}, 1)
GOVENDORFLAG := -mod=vendor
endif
GOBUILD := CGO_ENABLED=0 $(GO) build $(BUILD_FLAG) -trimpath $(GOVENDORFLAG)
GOBUILDNOVENDOR := CGO_ENABLED=0 $(GO) build $(BUILD_FLAG) -trimpath
GOTEST := CGO_ENABLED=1 $(GO) test -p $(P) --race
GOTESTNORACE := CGO_ENABLED=1 $(GO) test -p $(P)
ARCH := "$(shell uname -s)"
LINUX := "Linux"
MAC := "Darwin"
CDC_PKG := github.com/pingcap/tiflow
DM_PKG := github.com/pingcap/tiflow/dm
PACKAGE_LIST := go list ./... | grep -vE 'vendor|proto|tiflow\/tests|integration|testing_utils|pb|pbmock'
PACKAGE_LIST_WITHOUT_DM := $(PACKAGE_LIST) | grep -vE 'github.com/pingcap/tiflow/dm'
DM_PACKAGE_LIST := go list github.com/pingcap/tiflow/dm/... | grep -vE 'pb|pbmock|dm/cmd'
PACKAGES := $$($(PACKAGE_LIST))
PACKAGES_WITHOUT_DM := $$($(PACKAGE_LIST_WITHOUT_DM))
DM_PACKAGES := $$($(DM_PACKAGE_LIST))
FILES := $$(find . -name '*.go' -type f | grep -vE 'vendor|kv_gen|proto|pb\.go|pb\.gw\.go')
TEST_FILES := $$(find . -name '*_test.go' -type f | grep -vE 'vendor|kv_gen|integration|testing_utils')
TEST_FILES_WITHOUT_DM := $$(find . -name '*_test.go' -type f | grep -vE 'vendor|kv_gen|integration|testing_utils|^\./dm')
FAILPOINT_DIR := $$(for p in $(PACKAGES); do echo $${p\#"github.com/pingcap/$(PROJECT)/"}|grep -v "github.com/pingcap/$(PROJECT)"; done)
FAILPOINT := tools/bin/failpoint-ctl
FAILPOINT_ENABLE := $$(echo $(FAILPOINT_DIR) | xargs $(FAILPOINT) enable >/dev/null)
FAILPOINT_DISABLE := $$(echo $(FAILPOINT_DIR) | xargs $(FAILPOINT) disable >/dev/null)
RELEASE_VERSION =
ifeq ($(RELEASE_VERSION),)
RELEASE_VERSION := v5.4.0-master
release_version_regex := ^v5\..*$$
release_branch_regex := "^release-[0-9]\.[0-9].*$$|^HEAD$$|^.*/*tags/v[0-9]\.[0-9]\..*$$"
ifneq ($(shell git rev-parse --abbrev-ref HEAD | egrep $(release_branch_regex)),)
# If we are in release branch, try to use tag version.
ifneq ($(shell git describe --tags --dirty | egrep $(release_version_regex)),)
RELEASE_VERSION := $(shell git describe --tags --dirty)
endif
else ifneq ($(shell git status --porcelain),)
# Add -dirty if the working tree is dirty for non release branch.
RELEASE_VERSION := $(RELEASE_VERSION)-dirty
endif
endif
BUILDTS := $(shell date -u '+%Y-%m-%d %H:%M:%S')
GITHASH := $(shell git rev-parse HEAD)
GITBRANCH := $(shell git rev-parse --abbrev-ref HEAD)
GOVERSION := $(shell go version)
# CDC LDFLAGS.
LDFLAGS += -X "$(CDC_PKG)/pkg/version.ReleaseVersion=$(RELEASE_VERSION)"
LDFLAGS += -X "$(CDC_PKG)/pkg/version.BuildTS=$(BUILDTS)"
LDFLAGS += -X "$(CDC_PKG)/pkg/version.GitHash=$(GITHASH)"
LDFLAGS += -X "$(CDC_PKG)/pkg/version.GitBranch=$(GITBRANCH)"
LDFLAGS += -X "$(CDC_PKG)/pkg/version.GoVersion=$(GOVERSION)"
# DM LDFLAGS.
LDFLAGS += -X "$(DM_PKG)/pkg/utils.ReleaseVersion=$(RELEASE_VERSION)"
LDFLAGS += -X "$(DM_PKG)/pkg/utils.BuildTS=$(BUILDTS)"
LDFLAGS += -X "$(DM_PKG)/pkg/utils.GitHash=$(GITHASH)"
LDFLAGS += -X "$(DM_PKG)/pkg/utils.GitBranch=$(GITBRANCH)"
LDFLAGS += -X "$(DM_PKG)/pkg/utils.GoVersion=$(GOVERSION)"
default: build buildsucc
buildsucc:
@echo Build TiDB CDC successfully!
all: dev install
dev: check test
test: unit_test dm_unit_test
build: cdc dm
bank:
$(GOBUILD) -ldflags '$(LDFLAGS)' -o bin/bank ./tests/bank/bank.go ./tests/bank/case.go
build-failpoint: check_failpoint_ctl
$(FAILPOINT_ENABLE)
$(GOBUILD) -ldflags '$(LDFLAGS)' -o bin/cdc ./cmd/cdc/main.go
$(FAILPOINT_DISABLE)
cdc:
$(GOBUILD) -ldflags '$(LDFLAGS)' -o bin/cdc ./cmd/cdc/main.go
kafka_consumer:
$(GOBUILD) -ldflags '$(LDFLAGS)' -o bin/cdc_kafka_consumer ./cmd/kafka-consumer/main.go
install:
go install ./...
unit_test: check_failpoint_ctl
mkdir -p "$(TEST_DIR)"
$(FAILPOINT_ENABLE)
@export log_level=error;\
$(GOTEST) -cover -covermode=atomic -coverprofile="$(TEST_DIR)/cov.unit.out" $(PACKAGES_WITHOUT_DM) \
|| { $(FAILPOINT_DISABLE); exit 1; }
$(FAILPOINT_DISABLE)
unit_test_in_verify_ci: check_failpoint_ctl tools/bin/gotestsum tools/bin/gocov tools/bin/gocov-xml
mkdir -p "$(TEST_DIR)"
$(FAILPOINT_ENABLE)
@export log_level=error;\
CGO_ENABLED=1 tools/bin/gotestsum --junitfile cdc-junit-report.xml -- -v -timeout 5m -p $(P) --race \
-covermode=atomic -coverprofile="$(TEST_DIR)/cov.unit.out" $(PACKAGES_WITHOUT_DM) \
|| { $(FAILPOINT_DISABLE); exit 1; }
tools/bin/gocov convert "$(TEST_DIR)/cov.unit.out" | tools/bin/gocov-xml > cdc-coverage.xml
$(FAILPOINT_DISABLE)
@bash <(curl -s https://codecov.io/bash) -F cdc -f $(TEST_DIR)/cov.unit.out -t $(TICDC_CODECOV_TOKEN)
leak_test: check_failpoint_ctl
$(FAILPOINT_ENABLE)
@export log_level=error;\
$(GOTEST) -count=1 --tags leak $(PACKAGES_WITHOUT_DM) || { $(FAILPOINT_DISABLE); exit 1; }
$(FAILPOINT_DISABLE)
check_third_party_binary:
@which bin/tidb-server
@which bin/tikv-server
@which bin/pd-server
@which bin/tiflash
@which bin/pd-ctl
@which bin/sync_diff_inspector
@which bin/go-ycsb
@which bin/etcdctl
@which bin/jq
@which bin/minio
integration_test_build: check_failpoint_ctl
$(FAILPOINT_ENABLE)
$(GOTEST) -ldflags '$(LDFLAGS)' -c -cover -covermode=atomic \
-coverpkg=github.com/pingcap/tiflow/... \
-o bin/cdc.test github.com/pingcap/tiflow/cmd/cdc \
|| { $(FAILPOINT_DISABLE); exit 1; }
$(GOBUILD) -ldflags '$(LDFLAGS)' -o bin/cdc ./cmd/cdc/main.go \
|| { $(FAILPOINT_DISABLE); exit 1; }
$(FAILPOINT_DISABLE)
integration_test: integration_test_mysql
integration_test_mysql:
tests/integration_tests/run.sh mysql "$(CASE)"
integration_test_kafka: check_third_party_binary
tests/integration_tests/run.sh kafka "$(CASE)"
fmt: tools/bin/gofumports tools/bin/shfmt
@echo "gofmt (simplify)"
tools/bin/gofumports -l -w $(FILES) 2>&1 | $(FAIL_ON_STDOUT)
@echo "run shfmt"
tools/bin/shfmt -d -w .
errdoc: tools/bin/errdoc-gen
@echo "generator errors.toml"
# check-errdoc will skip DM directory.
./tools/check/check-errdoc.sh
# terror_check is only used for DM errors.
# TODO: unified the error framework of CDC and DM.
terror_check:
@echo "check terror conflict"
@cd dm && _utils/terror_gen/check.sh
check-copyright:
@echo "check-copyright"
@./scripts/check-copyright.sh
check-merge-conflicts:
@echo "check-merge-conflicts"
@./scripts/check-merge-conflicts.sh
check-leaktest-added: tools/bin/gofumports
@echo "check leak test added in all unit tests"
# TODO: enable leaktest for DM tests.
./scripts/add-leaktest.sh $(TEST_FILES_WITHOUT_DM)
vet:
@echo "vet"
$(GO) vet $(PACKAGES) 2>&1 | $(FAIL_ON_STDOUT)
tidy:
@echo "go mod tidy"
./tools/check/check-tidy.sh
# TODO: Unified cdc and dm config.
check-static: tools/bin/golangci-lint
tools/bin/golangci-lint run --timeout 10m0s --skip-files kv_gen --skip-dirs dm,tests
cd dm && ../tools/bin/golangci-lint run --timeout 10m0s
check: check-copyright fmt check-static tidy terror_check errdoc check-leaktest-added check-merge-conflicts
integration_test_coverage: tools/bin/gocovmerge tools/bin/goveralls
tools/bin/gocovmerge "$(TEST_DIR)"/cov.* | grep -vE ".*.pb.go|$(CDC_PKG)/testing_utils/.*|$(CDC_PKG)/cdc/kv/testing.go|$(CDC_PKG)/cdc/entry/schema_test_helper.go|$(CDC_PKG)/cdc/sink/simple_mysql_tester.go|.*.__failpoint_binding__.go" > "$(TEST_DIR)/all_cov.out"
ifeq ("$(JenkinsCI)", "1")
GO111MODULE=off go get github.com/mattn/goveralls
tools/bin/goveralls -coverprofile=$(TEST_DIR)/all_cov.out -service=jenkins-ci -repotoken $(COVERALLS_TOKEN)
else
go tool cover -html "$(TEST_DIR)/all_cov.out" -o "$(TEST_DIR)/all_cov.html"
endif
unit_test_coverage:
grep -vE ".*.pb.go|$(CDC_PKG)/testing_utils/.*|$(CDC_PKG)/cdc/kv/testing.go|$(CDC_PKG)/cdc/sink/simple_mysql_tester.go|.*.__failpoint_binding__.go" "$(TEST_DIR)/cov.unit.out" > "$(TEST_DIR)/unit_cov.out"
go tool cover -html "$(TEST_DIR)/unit_cov.out" -o "$(TEST_DIR)/unit_cov.html"
go tool cover -func="$(TEST_DIR)/unit_cov.out"
data-flow-diagram: docs/data-flow.dot
dot -Tsvg docs/data-flow.dot > docs/data-flow.svg
clean:
go clean -i ./...
rm -rf *.out
rm -rf bin
rm -rf tools/bin
dm: dm-master dm-worker dmctl dm-portal dm-syncer
dm-master:
$(GOBUILD) -ldflags '$(LDFLAGS)' -o bin/dm-master ./dm/cmd/dm-master
dm-master-with-webui:
@echo "build webui first"
cd dm/ui && yarn && yarn build
$(GOBUILD) -ldflags '$(LDFLAGS)' -tags dm_webui -o bin/dm-master ./dm/cmd/dm-master
dm-worker:
$(GOBUILD) -ldflags '$(LDFLAGS)' -o bin/dm-worker ./dm/cmd/dm-worker
dmctl:
$(GOBUILD) -ldflags '$(LDFLAGS)' -o bin/dmctl ./dm/cmd/dm-ctl
dm-portal:
$(GOBUILD) -ldflags '$(LDFLAGS)' -o bin/dm-portal ./dm/cmd/dm-portal
dm-syncer:
$(GOBUILD) -ldflags '$(LDFLAGS)' -o bin/dm-syncer ./dm/cmd/dm-syncer
dm-chaos-case:
$(GOBUILD) -ldflags '$(LDFLAGS)' -o bin/dm-chaos-case ./dm/chaos/cases
dm_debug-tools:
$(GOBUILD) -ldflags '$(LDFLAGS)' -o bin/binlog-event-blackhole ./dm/debug-tools/binlog-event-blackhole
dm_generate_proto: tools/bin/protoc-gen-gogofaster tools/bin/protoc-gen-grpc-gateway
./dm/generate-dm.sh
dm_generate_mock: tools/bin/mockgen
./dm/tests/generate-mock.sh
dm_generate_openapi: tools/bin/oapi-codegen
@echo "generate_openapi"
cd dm && ../tools/bin/oapi-codegen --config=openapi/spec/server-gen-cfg.yaml openapi/spec/dm.yaml
cd dm && ../tools/bin/oapi-codegen --config=openapi/spec/types-gen-cfg.yaml openapi/spec/dm.yaml
cd dm && ../tools/bin/oapi-codegen --config=openapi/spec/client-gen-cfg.yaml openapi/spec/dm.yaml
dm_unit_test: check_failpoint_ctl
mkdir -p $(DM_TEST_DIR)
$(FAILPOINT_ENABLE)
@export log_level=error; \
$(GOTEST) -timeout 5m -covermode=atomic -coverprofile="$(DM_TEST_DIR)/cov.unit_test.out" $(DM_PACKAGES) \
|| { $(FAILPOINT_DISABLE); exit 1; }
$(FAILPOINT_DISABLE)
dm_unit_test_in_verify_ci: check_failpoint_ctl tools/bin/gotestsum tools/bin/gocov tools/bin/gocov-xml
mkdir -p $(DM_TEST_DIR)
$(FAILPOINT_ENABLE)
@export log_level=error; \
CGO_ENABLED=1 tools/bin/gotestsum --junitfile dm-junit-report.xml -- -v -timeout 5m -p $(P) --race \
-covermode=atomic -coverprofile="$(DM_TEST_DIR)/cov.unit_test.out" $(DM_PACKAGES) \
|| { $(FAILPOINT_DISABLE); exit 1; }
tools/bin/gocov convert "$(DM_TEST_DIR)/cov.unit_test.out" | tools/bin/gocov-xml > dm-coverage.xml
$(FAILPOINT_DISABLE)
@bash <(curl -s https://codecov.io/bash) -F dm -f $(DM_TEST_DIR)/cov.unit_test.out -t $(TICDC_CODECOV_TOKEN)
dm_integration_test_build: check_failpoint_ctl
$(FAILPOINT_ENABLE)
$(GOTEST) -ldflags '$(LDFLAGS)' -c -cover -covermode=atomic \
-coverpkg=github.com/pingcap/tiflow/dm/... \
-o bin/dm-worker.test github.com/pingcap/tiflow/dm/cmd/dm-worker \
|| { $(FAILPOINT_DISABLE); exit 1; }
$(GOTEST) -ldflags '$(LDFLAGS)' -c -cover -covermode=atomic \
-coverpkg=github.com/pingcap/tiflow/dm/... \
-o bin/dm-master.test github.com/pingcap/tiflow/dm/cmd/dm-master \
|| { $(FAILPOINT_DISABLE); exit 1; }
$(GOTESTNORACE) -ldflags '$(LDFLAGS)' -c -cover -covermode=count \
-coverpkg=github.com/pingcap/tiflow/dm/... \
-o bin/dmctl.test github.com/pingcap/tiflow/dm/cmd/dm-ctl \
|| { $(FAILPOINT_DISABLE); exit 1; }
$(GOTEST) -ldflags '$(LDFLAGS)' -c -cover -covermode=atomic \
-coverpkg=github.com/pingcap/tiflow/dm/... \
-o bin/dm-syncer.test github.com/pingcap/tiflow/dm/cmd/dm-syncer \
|| { $(FAILPOINT_DISABLE); exit 1; }
$(FAILPOINT_DISABLE)
./dm/tests/prepare_tools.sh
dm_integration_test_build_worker: check_failpoint_ctl
$(FAILPOINT_ENABLE)
$(GOTEST) -ldflags '$(LDFLAGS)' -c -cover -covermode=atomic \
-coverpkg=github.com/pingcap/tiflow/dm/... \
-o bin/dm-worker.test github.com/pingcap/tiflow/dm/cmd/dm-worker \
|| { $(FAILPOINT_DISABLE); exit 1; }
$(FAILPOINT_DISABLE)
./dm/tests/prepare_tools.sh
dm_integration_test_build_master: check_failpoint_ctl
$(FAILPOINT_ENABLE)
$(GOTEST) -ldflags '$(LDFLAGS)' -c -cover -covermode=atomic \
-coverpkg=github.com/pingcap/tiflow/dm/... \
-o bin/dm-master.test github.com/pingcap/tiflow/dm/cmd/dm-master \
|| { $(FAILPOINT_DISABLE); exit 1; }
$(FAILPOINT_DISABLE)
./dm/tests/prepare_tools.sh
install_test_python_dep:
@echo "install python requirments for test"
pip install --user -q -r ./dm/tests/requirements.txt
check_third_party_binary_for_dm:
@which bin/tidb-server
@which bin/sync_diff_inspector
@which mysql
dm_integration_test: check_third_party_binary_for_dm install_test_python_dep
@which bin/dm-master.test
@which bin/dm-worker.test
@which bin/dm-syncer.test
cd dm && ln -sf ../bin .
cd dm && ./tests/run.sh $(CASE)
dm_compatibility_test: check_third_party_binary_for_dm
@which bin/dm-master.test.current
@which bin/dm-worker.test.current
@which bin/dm-master.test.previous
@which bin/dm-worker.test.previous
cd dm && ln -sf ../bin .
cd dm && ./tests/compatibility_run.sh ${CASE}
dm_coverage: tools/bin/gocovmerge tools/bin/goveralls
# unify cover mode in coverage files, more details refer to dm/tests/_utils/run_dm_ctl
find "$(DM_TEST_DIR)" -type f -name "cov.*.dmctl.*.out" -exec sed -i "s/mode: count/mode: atomic/g" {} \;
tools/bin/gocovmerge "$(DM_TEST_DIR)"/cov.* | grep -vE ".*.pb.go|.*.pb.gw.go|.*.__failpoint_binding__.go|.*debug-tools.*|.*portal.*|.*chaos.*" > "$(DM_TEST_DIR)/all_cov.out"
tools/bin/gocovmerge "$(DM_TEST_DIR)"/cov.unit_test*.out | grep -vE ".*.pb.go|.*.pb.gw.go|.*.__failpoint_binding__.go|.*debug-tools.*|.*portal.*|.*chaos.*" > $(DM_TEST_DIR)/unit_test.out
go tool cover -html "$(DM_TEST_DIR)/all_cov.out" -o "$(DM_TEST_DIR)/all_cov.html"
go tool cover -html "$(DM_TEST_DIR)/unit_test.out" -o "$(DM_TEST_DIR)/unit_test_cov.html"
tools/bin/failpoint-ctl: tools/check/go.mod
cd tools/check && $(GO) build -mod=mod -o ../bin/failpoint-ctl github.com/pingcap/failpoint/failpoint-ctl
tools/bin/gocovmerge: tools/check/go.mod
cd tools/check && $(GO) build -mod=mod -o ../bin/gocovmerge github.com/zhouqiang-cl/gocovmerge
tools/bin/goveralls: tools/check/go.mod
cd tools/check && $(GO) build -mod=mod -o ../bin/goveralls github.com/mattn/goveralls
tools/bin/golangci-lint: tools/check/go.mod
cd tools/check && $(GO) build -mod=mod -o ../bin/golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lint
tools/bin/mockgen: tools/check/go.mod
cd tools/check && $(GO) build -mod=mod -o ../bin/mockgen github.com/golang/mock/mockgen
tools/bin/protoc-gen-gogofaster: tools/check/go.mod
cd tools/check && $(GO) build -mod=mod -o ../bin/protoc-gen-gogofaster github.com/gogo/protobuf/protoc-gen-gogofaster
tools/bin/protoc-gen-grpc-gateway: tools/check/go.mod
cd tools/check && $(GO) build -mod=mod -o ../bin/protoc-gen-grpc-gateway github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
tools/bin/statik: tools/check/go.mod
cd tools/check && $(GO) build -mod=mod -o ../bin/statik github.com/rakyll/statik
tools/bin/gofumports: tools/check/go.mod
cd tools/check && $(GO) build -mod=mod -o ../bin/gofumports mvdan.cc/gofumpt/gofumports
tools/bin/shfmt: tools/check/go.mod
cd tools/check && $(GO) build -mod=mod -o ../bin/shfmt mvdan.cc/sh/v3/cmd/shfmt
tools/bin/oapi-codegen: tools/check/go.mod
cd tools/check && $(GO) build -mod=mod -o ../bin/oapi-codegen github.com/deepmap/oapi-codegen/cmd/oapi-codegen
tools/bin/gocov: tools/check/go.mod
cd tools/check && $(GO) build -mod=mod -o ../bin/gocov github.com/axw/gocov/gocov
tools/bin/gocov-xml: tools/check/go.mod
cd tools/check && $(GO) build -mod=mod -o ../bin/gocov-xml github.com/AlekSi/gocov-xml
tools/bin/gotestsum: tools/check/go.mod
cd tools/check && $(GO) build -mod=mod -o ../bin/gotestsum gotest.tools/gotestsum
tools/bin/errdoc-gen: tools/check/go.mod
cd tools/check && $(GO) build -mod=mod -o ../bin/errdoc-gen github.com/pingcap/errors/errdoc-gen
check_failpoint_ctl: tools/bin/failpoint-ctl
failpoint-enable: check_failpoint_ctl
$(FAILPOINT_ENABLE)
failpoint-disable: check_failpoint_ctl
$(FAILPOINT_DISABLE)