19
Makefile
19
Makefile
@ -29,17 +29,14 @@ dev: checklist check explaintest gogenerate br_unit_test test_part_parser_dev ut
|
||||
@>&2 echo "Great, all tests passed."
|
||||
|
||||
# Install the check tools.
|
||||
check-setup:tools/bin/revive tools/bin/goword
|
||||
check-setup:tools/bin/revive
|
||||
|
||||
check: check-parallel lint tidy testSuite errdoc bazel_golangcilinter
|
||||
check: check-parallel lint tidy testSuite errdoc bazel_golangcilinter bazel_all_build
|
||||
|
||||
fmt:
|
||||
@echo "gofmt (simplify)"
|
||||
@gofmt -s -l -w $(FILES) 2>&1 | $(FAIL_ON_STDOUT)
|
||||
|
||||
goword:tools/bin/goword
|
||||
tools/bin/goword $(FILES) 2>&1 | $(FAIL_ON_STDOUT)
|
||||
|
||||
check-static: tools/bin/golangci-lint
|
||||
GO111MODULE=on CGO_ENABLED=0 tools/bin/golangci-lint run -v $$($(PACKAGE_DIRECTORIES)) --config .golangci.yml
|
||||
|
||||
@ -332,15 +329,6 @@ ifeq ("$(GOOS)", "freebsd")
|
||||
GOBUILD = CGO_ENABLED=0 GO111MODULE=on go build -trimpath -ldflags '$(LDFLAGS)'
|
||||
endif
|
||||
|
||||
br_coverage:
|
||||
tools/bin/gocovmerge "$(TEST_DIR)"/cov.* | grep -vE ".*.pb.go|.*__failpoint_binding__.go" > "$(TEST_DIR)/all_cov.out"
|
||||
ifeq ("$(JenkinsCI)", "1")
|
||||
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"
|
||||
grep -F '<option' "$(TEST_DIR)/all_cov.html"
|
||||
endif
|
||||
|
||||
# TODO: adjust bins when br integraion tests reformat.
|
||||
br_bins:
|
||||
@which bin/tidb-server
|
||||
@ -405,8 +393,7 @@ bazel_test: failpoint-enable bazel_ci_prepare
|
||||
-//tests/globalkilltest/... -//tests/readonlytest/... -//br/pkg/task:task_test
|
||||
|
||||
|
||||
bazel_coverage_test: bazel_all_build failpoint-enable bazel_ci_prepare
|
||||
bazel --output_user_root=/home/jenkins/.tidb/tmp run --config=ci //:gazelle
|
||||
bazel_coverage_test: failpoint-enable bazel_ci_prepare
|
||||
bazel --output_user_root=/home/jenkins/.tidb/tmp coverage --config=ci --build_event_json_file=bazel_1.json --@io_bazel_rules_go//go/config:cover_format=go_cover \
|
||||
-- //... -//cmd/... -//tests/graceshutdown/... \
|
||||
-//tests/globalkilltest/... -//tests/readonlytest/... -//br/pkg/task:task_test
|
||||
|
||||
Reference in New Issue
Block a user