|
|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
Index: src/github.com/pingcap/tidb/Makefile
|
|
|
|
|
--- src/github.com/pingcap/tidb/Makefile.orig 2019-11-24 17:00:06.000000000 +0100
|
|
|
|
|
+++ src/github.com/pingcap/tidb/Makefile 2019-11-24 17:07:31.987438000 +0100
|
|
|
|
|
@@ -11,7 +11,7 @@
|
|
|
|
|
--- src/github.com/pingcap/tidb/Makefile.orig 2020-02-15 23:59:09.000000000 +0100
|
|
|
|
|
+++ src/github.com/pingcap/tidb/Makefile 2020-02-16 09:58:01.653859000 +0100
|
|
|
|
|
@@ -25,7 +25,7 @@
|
|
|
|
|
path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(GOPATH))):$(PWD)/tools/bin
|
|
|
|
|
export PATH := $(path_to_add):$(PATH)
|
|
|
|
|
|
|
|
|
|
@ -9,8 +9,8 @@ Index: src/github.com/pingcap/tidb/Makefile
|
|
|
|
|
+GO := go
|
|
|
|
|
GOBUILD := $(GO) build $(BUILD_FLAG) -tags codes
|
|
|
|
|
GOBUILDCOVERAGE := GOPATH=$(GOPATH) cd tidb-server; $(GO) test -coverpkg="../..." -c .
|
|
|
|
|
GOTEST := $(GO) test -p 8
|
|
|
|
|
@@ -30,8 +30,8 @@
|
|
|
|
|
GOTEST := $(GO) test -p $(P)
|
|
|
|
|
@@ -45,8 +45,8 @@
|
|
|
|
|
|
|
|
|
|
LDFLAGS += -X "github.com/pingcap/parser/mysql.TiDBReleaseVersion=$(shell git describe --tags --dirty --always)"
|
|
|
|
|
LDFLAGS += -X "github.com/pingcap/tidb/util/printer.TiDBBuildTS=$(shell date -u '+%Y-%m-%d %I:%M:%S')"
|
|
|
|
|
@ -18,10 +18,10 @@ Index: src/github.com/pingcap/tidb/Makefile
|
|
|
|
|
-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"
|
|
|
|
|
@@ -78,7 +78,6 @@
|
|
|
|
|
COVERAGE_SERVER_LDFLAGS = -X "github.com/pingcap/tidb/tidb-server.isCoverageServer=1"
|
|
|
|
|
@@ -92,7 +92,6 @@
|
|
|
|
|
@gofmt -s -l -w $(FILES) 2>&1 | $(FAIL_ON_STDOUT)
|
|
|
|
|
|
|
|
|
|
goword:tools/bin/goword
|
|
|
|
|
@ -29,7 +29,7 @@ Index: src/github.com/pingcap/tidb/Makefile
|
|
|
|
|
|
|
|
|
|
gosec:tools/bin/gosec
|
|
|
|
|
tools/bin/gosec $$($(PACKAGE_DIRECTORIES))
|
|
|
|
|
@@ -106,12 +105,8 @@
|
|
|
|
|
@@ -117,12 +116,8 @@
|
|
|
|
|
./tools/check/check-gogenerate.sh
|
|
|
|
|
|
|
|
|
|
lint:tools/bin/revive
|
|
|
|
|
@ -40,9 +40,9 @@ Index: src/github.com/pingcap/tidb/Makefile
|
|
|
|
|
- @echo "vet"
|
|
|
|
|
- $(GO) vet -all $(PACKAGES) 2>&1 | $(FAIL_ON_STDOUT)
|
|
|
|
|
|
|
|
|
|
tidy:
|
|
|
|
|
@echo "go mod tidy"
|
|
|
|
|
@@ -142,36 +137,12 @@
|
|
|
|
|
staticcheck:
|
|
|
|
|
$(GO) get honnef.co/go/tools/cmd/staticcheck
|
|
|
|
|
@@ -163,36 +158,12 @@
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
gotest: failpoint-enable
|
|
|
|
|
@ -59,7 +59,7 @@ Index: src/github.com/pingcap/tidb/Makefile
|
|
|
|
|
-else
|
|
|
|
|
- @echo "Running in native mode."
|
|
|
|
|
- @export log_level=error; export TZ='Asia/Shanghai'; \
|
|
|
|
|
- $(GOTEST) -ldflags '$(TEST_LDFLAGS)' -cover $(PACKAGES) -check.timeout 4s || { $(FAILPOINT_DISABLE); exit 1; }
|
|
|
|
|
- $(GOTEST) -ldflags '$(TEST_LDFLAGS)' -cover $(PACKAGES) -check.p true -check.timeout 4s || { $(FAILPOINT_DISABLE); exit 1; }
|
|
|
|
|
-endif
|
|
|
|
|
- @$(FAILPOINT_DISABLE)
|
|
|
|
|
|
|
|
|
|
|