You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
2.9 KiB
76 lines
2.9 KiB
Index: src/github.com/pingcap/tidb/Makefile |
|
--- src/github.com/pingcap/tidb/Makefile.orig 2019-01-19 10:25:21.000000000 +0100 |
|
+++ src/github.com/pingcap/tidb/Makefile 2019-01-19 10:34:32.014985000 +0100 |
|
@@ -11,7 +11,7 @@ |
|
path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(GOPATH))) |
|
export PATH := $(path_to_add):$(PATH) |
|
|
|
-GO := GO111MODULE=on go |
|
+GO := go |
|
GOBUILD := CGO_ENABLED=1 $(GO) build $(BUILD_FLAG) |
|
GOTEST := CGO_ENABLED=1 $(GO) test -p 3 |
|
OVERALLS := CGO_ENABLED=1 GO111MODULE=on overalls |
|
@@ -29,8 +29,8 @@ |
|
|
|
LDFLAGS += -X "github.com/pingcap/parser/mysql.TiDBReleaseVersion=$(shell git describe --tags --dirty)" |
|
LDFLAGS += -X "github.com/pingcap/tidb/util/printer.TiDBBuildTS=$(shell date -u '+%Y-%m-%d %I:%M:%S')" |
|
-LDFLAGS += -X "github.com/pingcap/tidb/util/printer.TiDBGitHash=$(shell git rev-parse HEAD)" |
|
-LDFLAGS += -X "github.com/pingcap/tidb/util/printer.TiDBGitBranch=$(shell git rev-parse --abbrev-ref HEAD)" |
|
+LDFLAGS += -X "github.com/pingcap/tidb/util/printer.TiDBGitHash=000000" |
|
+LDFLAGS += -X "github.com/pingcap/tidb/util/printer.TiDBGitBranch=master" |
|
LDFLAGS += -X "github.com/pingcap/tidb/util/printer.GoVersion=$(shell go version)" |
|
|
|
TEST_LDFLAGS = -X "github.com/pingcap/tidb/config.checkBeforeDropLDFlag=1" |
|
@@ -71,7 +71,6 @@ |
|
@gofmt -s -l -w $(FILES) 2>&1 | $(FAIL_ON_STDOUT) |
|
|
|
goword:tools/bin/goword |
|
- tools/bin/goword $(FILES) 2>&1 | $(FAIL_ON_STDOUT) |
|
|
|
gosec:tools/bin/gosec |
|
tools/bin/gosec $$($(PACKAGE_DIRECTORIES)) |
|
@@ -94,12 +93,8 @@ |
|
@GO111MODULE=on tools/bin/errcheck -exclude ./tools/check/errcheck_excludes.txt -blank $(PACKAGES) | grep -v "_test\.go" | awk '{print} END{if(NR>0) {exit 1}}' |
|
|
|
lint:tools/bin/revive |
|
- @echo "linting" |
|
- @tools/bin/revive -formatter friendly -config tools/check/revive.toml $(FILES) |
|
|
|
vet: |
|
- @echo "vet" |
|
- $(GO) vet -all -shadow $(PACKAGES) 2>&1 | $(FAIL_ON_STDOUT) |
|
|
|
tidy: |
|
@echo "go mod tidy" |
|
@@ -123,31 +118,12 @@ |
|
endif |
|
|
|
gotest: gofail-enable |
|
-ifeq ("$(TRAVIS_COVERAGE)", "1") |
|
- @echo "Running in TRAVIS_COVERAGE mode." |
|
- @export log_level=error; \ |
|
- $(GO) get github.com/go-playground/overalls |
|
- $(OVERALLS) -project=github.com/pingcap/tidb -covermode=count -ignore='.git,vendor,cmd,docs,LICENSES' -concurrency=1 || { $(GOFAIL_DISABLE); exit 1; } |
|
-else |
|
- @echo "Running in native mode." |
|
- @export log_level=error; \ |
|
- $(GOTEST) -ldflags '$(TEST_LDFLAGS)' -cover $(PACKAGES) || { $(GOFAIL_DISABLE); exit 1; } |
|
-endif |
|
- @$(GOFAIL_DISABLE) |
|
|
|
race: gofail-enable |
|
- @export log_level=debug; \ |
|
- $(GOTEST) -timeout 20m -race $(PACKAGES) || { $(GOFAIL_DISABLE); exit 1; } |
|
- @$(GOFAIL_DISABLE) |
|
|
|
leak: gofail-enable |
|
- @export log_level=debug; \ |
|
- $(GOTEST) -tags leak $(PACKAGES) || { $(GOFAIL_DISABLE); exit 1; } |
|
- @$(GOFAIL_DISABLE) |
|
|
|
tikv_integration_test: gofail-enable |
|
- $(GOTEST) ./store/tikv/. -with-tikv=true || { $(GOFAIL_DISABLE); exit 1; } |
|
- @$(GOFAIL_DISABLE) |
|
|
|
RACE_FLAG = |
|
ifeq ("$(WITH_RACE)", "1")
|
|
|