@@ -24,8 +24,8 @@ PACKAGES := $$($(PACKAGE_LIST))
24
24
PACKAGE_DIRECTORIES := $(PACKAGE_LIST ) | sed 's|github.com/pingcap/$(PROJECT ) /||'
25
25
FILES := $$(find $$($(PACKAGE_DIRECTORIES ) ) -name "*.go" )
26
26
27
- GOFAIL_ENABLE := $$(find $$PWD/ -type d | grep -vE "(\.git|tools ) " | xargs tools/bin/gofail enable)
28
- GOFAIL_DISABLE := $$(find $$PWD/ -type d | grep -vE "(\.git|tools ) " | xargs tools/bin/gofail disable)
27
+ FAILPOINT_ENABLE := $$(find $$PWD/ -type d | grep -vE "(\.git|tools ) " | xargs tools/bin/failpoint-ctl enable)
28
+ FAILPOINT_DISABLE := $$(find $$PWD/ -type d | grep -vE "(\.git|tools ) " | xargs tools/bin/failpoint-ctl disable)
29
29
30
30
LDFLAGS += -X "github.com/pingcap/parser/mysql.TiDBReleaseVersion=$(shell git describe --tags --dirty --always) "
31
31
LDFLAGS += -X "github.com/pingcap/tidb/util/printer.TiDBBuildTS=$(shell date -u '+% Y-% m-% d % I:% M:% S') "
@@ -123,37 +123,37 @@ ifeq ("$(TRAVIS_COVERAGE)", "1")
123
123
bash <(curl -s https://codecov.io/bash)
124
124
endif
125
125
126
- gotest : gofail -enable
126
+ gotest : failpoint -enable
127
127
ifeq ("$(TRAVIS_COVERAGE ) ", "1")
128
128
@echo "Running in TRAVIS_COVERAGE mode."
129
129
@export log_level=error; \
130
130
$(GO) get github.com/go-playground/overalls
131
131
$(OVERALLS) -project=github.com/pingcap/tidb \
132
132
-covermode=count \
133
133
-ignore='.git,vendor,cmd,docs,LICENSES' \
134
- -concurrency=2 \
134
+ -concurrency=4 \
135
135
-- -coverpkg=./... \
136
- || { $(GOFAIL_DISABLE ); exit 1; }
136
+ || { $(FAILPOINT_DISABLE ); exit 1; }
137
137
else
138
138
@echo "Running in native mode."
139
139
@export log_level=error; \
140
- $(GOTEST) -ldflags '$(TEST_LDFLAGS)' -cover $(PACKAGES) || { $(GOFAIL_DISABLE ); exit 1; }
140
+ $(GOTEST) -ldflags '$(TEST_LDFLAGS)' -cover $(PACKAGES) || { $(FAILPOINT_DISABLE ); exit 1; }
141
141
endif
142
- @$(GOFAIL_DISABLE )
142
+ @$(FAILPOINT_DISABLE )
143
143
144
- race : gofail -enable
144
+ race : failpoint -enable
145
145
@export log_level=debug; \
146
- $(GOTEST ) -timeout 20m -race $(PACKAGES ) || { $( GOFAIL_DISABLE ) ; exit 1; }
147
- @$(GOFAIL_DISABLE )
146
+ $(GOTEST ) -timeout 20m -race $(PACKAGES ) || { $( FAILPOINT_DISABLE ) ; exit 1; }
147
+ @$(FAILPOINT_DISABLE )
148
148
149
- leak : gofail -enable
149
+ leak : failpoint -enable
150
150
@export log_level=debug; \
151
- $(GOTEST ) -tags leak $(PACKAGES ) || { $( GOFAIL_DISABLE ) ; exit 1; }
152
- @$(GOFAIL_DISABLE )
151
+ $(GOTEST ) -tags leak $(PACKAGES ) || { $( FAILPOINT_DISABLE ) ; exit 1; }
152
+ @$(FAILPOINT_DISABLE )
153
153
154
- tikv_integration_test : gofail -enable
155
- $(GOTEST ) ./store/tikv/. -with-tikv=true || { $( GOFAIL_DISABLE ) ; exit 1; }
156
- @$(GOFAIL_DISABLE )
154
+ tikv_integration_test : failpoint -enable
155
+ $(GOTEST ) ./store/tikv/. -with-tikv=true || { $( FAILPOINT_DISABLE ) ; exit 1; }
156
+ @$(FAILPOINT_DISABLE )
157
157
158
158
RACE_FLAG =
159
159
ifeq ("$(WITH_RACE ) ", "1")
@@ -195,13 +195,13 @@ importer:
195
195
checklist :
196
196
cat checklist.md
197
197
198
- gofail -enable : tools/bin/gofail
198
+ failpoint -enable : tools/bin/failpoint-ctl
199
199
# Converting gofail failpoints...
200
- @$(GOFAIL_ENABLE )
200
+ @$(FAILPOINT_ENABLE )
201
201
202
- gofail -disable : tools/bin/gofail
202
+ failpoint -disable : tools/bin/failpoint-ctl
203
203
# Restoring gofail failpoints...
204
- @$(GOFAIL_DISABLE )
204
+ @$(FAILPOINT_DISABLE )
205
205
206
206
checkdep :
207
207
$(GO ) list -f ' {{ join .Imports "\n" }}' github.com/pingcap/tidb/store/tikv | grep ^github.com/pingcap/parser$$ || exit 0; exit 1
@@ -230,8 +230,8 @@ tools/bin/errcheck: tools/check/go.mod
230
230
cd tools/check; \
231
231
$(GO ) build -o ../bin/errcheck github.com/kisielk/errcheck
232
232
233
- tools/bin/gofail : go.mod
234
- $(GO ) build -o $@ github.com/pingcap/gofail
233
+ tools/bin/failpoint-ctl : go.mod
234
+ $(GO ) build -o $@ github.com/pingcap/failpoint/failpoint-ctl
235
235
236
236
tools/bin/misspell :tools/check/go.mod
237
237
$(GO ) get -u github.com/client9/misspell/cmd/misspell
0 commit comments