@@ -180,27 +180,6 @@ check-testing-t:
180
180
FAILPOINT_ENABLE := $$(find $$PWD/ -type d | grep -vE "\.git" | xargs failpoint-ctl enable )
181
181
FAILPOINT_DISABLE := $$(find $$PWD/ -type d | grep -vE "\.git" | xargs failpoint-ctl disable )
182
182
183
- DEADLOCK_ENABLE := $$(\
184
- find . -name "*.go" \
185
- | xargs -n 1 sed -i.bak 's/sync\.RWMutex/deadlock.RWMutex/;s/sync\.Mutex/deadlock.Mutex/' && \
186
- find . -name "*.go" | xargs grep -lE "(deadlock\.RWMutex|deadlock\.Mutex ) " \
187
- | xargs goimports -w)
188
- DEADLOCK_DISABLE := $$(\
189
- find . -name "*.go" \
190
- | xargs -n 1 sed -i.bak 's/deadlock\.RWMutex/sync.RWMutex/;s/deadlock\.Mutex/sync.Mutex/' && \
191
- find . -name "*.go" | xargs grep -lE "(sync\.RWMutex|sync\.Mutex ) " \
192
- | xargs goimports -w && \
193
- find . -name "*.bak" | xargs rm && \
194
- go mod tidy)
195
-
196
- deadlock-enable : install-tools
197
- # Enabling deadlock...
198
- @$(DEADLOCK_ENABLE )
199
-
200
- deadlock-disable : install-tools
201
- # Disabling deadlock...
202
- @$(DEADLOCK_DISABLE )
203
-
204
183
failpoint-enable : install-tools
205
184
# Converting failpoints...
206
185
@$(FAILPOINT_ENABLE )
@@ -209,7 +188,7 @@ failpoint-disable: install-tools
209
188
# Restoring failpoints...
210
189
@$(FAILPOINT_DISABLE )
211
190
212
- .PHONY : deadlock-enable deadlock-disable failpoint-enable failpoint-disable
191
+ .PHONY : failpoint-enable failpoint-disable
213
192
214
193
# ### Test ####
215
194
@@ -223,11 +202,9 @@ SUBMODULES := $(filter $(shell find . -iname "go.mod" -exec dirname {} \;),\
223
202
224
203
test : install-tools
225
204
# testing all pkgs...
226
- @$(DEADLOCK_ENABLE )
227
205
@$(FAILPOINT_ENABLE )
228
- CGO_ENABLED=1 go test -tags tso_function_test -timeout 20m -race -cover $(TEST_PKGS ) || { $( FAILPOINT_DISABLE) ; $( DEADLOCK_DISABLE ) ; exit 1; }
206
+ CGO_ENABLED=1 go test -tags tso_function_test,deadlock -timeout 20m -race -cover $(TEST_PKGS ) || { $( FAILPOINT_DISABLE) ; exit 1; }
229
207
@$(FAILPOINT_DISABLE )
230
- @$(DEADLOCK_DISABLE )
231
208
232
209
basic-test : install-tools
233
210
# testing basic pkgs...
@@ -236,36 +213,28 @@ basic-test: install-tools
236
213
@$(FAILPOINT_DISABLE )
237
214
238
215
ci-test-job : install-tools dashboard-ui
239
- @$(DEADLOCK_ENABLE )
240
216
@$(FAILPOINT_ENABLE )
241
- CGO_ENABLED=1 go test -race -covermode=atomic -coverprofile=covprofile -coverpkg=./... $(shell ./scripts/ci-subtask.sh $(JOB_COUNT ) $(JOB_INDEX ) )
217
+ CGO_ENABLED=1 go test -tags deadlock - race -covermode=atomic -coverprofile=covprofile -coverpkg=./... $(shell ./scripts/ci-subtask.sh $(JOB_COUNT ) $(JOB_INDEX ) )
242
218
@$(FAILPOINT_DISABLE )
243
- @$(DEADLOCK_DISABLE )
244
219
245
220
ci-test-job-submod : install-tools dashboard-ui
246
- @$(DEADLOCK_ENABLE )
247
221
@$(FAILPOINT_ENABLE )
248
222
@ for mod in $( SUBMODULES) ; do cd $$ mod && $( MAKE) ci-test-job && cd - > /dev/null && cat $$ mod/covprofile >> covprofile; done
249
223
@$(FAILPOINT_DISABLE )
250
- @$(DEADLOCK_DISABLE )
251
224
252
225
TSO_INTEGRATION_TEST_PKGS := $(PD_PKG ) /tests/server/tso
253
226
254
227
test-tso-function : install-tools
255
228
# testing TSO function...
256
- @$(DEADLOCK_ENABLE )
257
229
@$(FAILPOINT_ENABLE )
258
- CGO_ENABLED=1 go test -race -tags without_dashboard,tso_function_test $(TSO_INTEGRATION_TEST_PKGS ) || { $( FAILPOINT_DISABLE) ; $( DEADLOCK_DISABLE ) ; exit 1; }
230
+ CGO_ENABLED=1 go test -race -tags without_dashboard,tso_function_test,deadlock $(TSO_INTEGRATION_TEST_PKGS ) || { $( FAILPOINT_DISABLE) ; exit 1; }
259
231
@$(FAILPOINT_DISABLE )
260
- @$(DEADLOCK_DISABLE )
261
232
262
233
test-tso-consistency : install-tools
263
234
# testing TSO consistency...
264
- @$(DEADLOCK_ENABLE )
265
235
@$(FAILPOINT_ENABLE )
266
- CGO_ENABLED=1 go test -race -tags without_dashboard,tso_consistency_test $(TSO_INTEGRATION_TEST_PKGS ) || { $( FAILPOINT_DISABLE) ; $( DEADLOCK_DISABLE ) ; exit 1; }
236
+ CGO_ENABLED=1 go test -race -tags without_dashboard,tso_consistency_test,deadlock $(TSO_INTEGRATION_TEST_PKGS ) || { $( FAILPOINT_DISABLE) ; exit 1; }
267
237
@$(FAILPOINT_DISABLE )
268
- @$(DEADLOCK_DISABLE )
269
238
270
239
.PHONY : test basic-test test-with-cover test-tso-function test-tso-consistency
271
240
@@ -292,7 +261,7 @@ split:
292
261
293
262
# ### Clean up ####
294
263
295
- clean : failpoint-disable deadlock-disable clean-test clean-build
264
+ clean : failpoint-disable clean-test clean-build
296
265
297
266
clean-test :
298
267
# Cleaning test tmp...
0 commit comments