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.
 
 
 
 
 
 

77 lines
2.8 KiB

Index: src/github.com/pingcap/tidb/Makefile
--- src/github.com/pingcap/tidb/Makefile.orig 2018-09-01 16:27:09.000000000 +0200
+++ src/github.com/pingcap/tidb/Makefile 2018-09-01 16:32:28.132432000 +0200
@@ -30,8 +30,8 @@
LDFLAGS += -X "github.com/pingcap/tidb/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"
@@ -95,7 +95,6 @@
@gofmt -s -l -w $(FILES) 2>&1 | grep -v "vendor|parser/parser.go" | $(FAIL_ON_STDOUT)
goword:
- retool do goword $(FILES) 2>&1 | $(FAIL_ON_STDOUT)
check-static:
@ # vet and fmt have problems with vendor when ran through metalinter
@@ -112,12 +111,8 @@
CGO_ENABLED=0 retool do gosec $$($(PACKAGE_DIRECTORIES))
lint:
- @echo "linting"
- @CGO_ENABLED=0 retool do revive -formatter friendly -config revive.toml $(PACKAGES)
vet:
- @echo "vet"
- @go vet -all -shadow $(PACKAGES) 2>&1 | $(FAIL_ON_STDOUT)
clean:
$(GO) clean -i ./...
@@ -135,41 +130,12 @@
@cd cmd/explaintest && ./run-tests.sh -s ../../bin/tidb-server
gotest: parserlib
- go get github.com/etcd-io/gofail
- @$(GOFAIL_ENABLE)
-ifeq ("$(TRAVIS_COVERAGE)", "1")
- @echo "Running in TRAVIS_COVERAGE mode."
- @export log_level=error; \
- go get github.com/go-playground/overalls
- go get github.com/mattn/goveralls
- $(OVERALLS) -project=github.com/pingcap/tidb -covermode=count -ignore='.git,vendor,cmd,docs,LICENSES' || { $(GOFAIL_DISABLE); exit 1; }
- $(GOVERALLS) -service=travis-ci -coverprofile=overalls.coverprofile || { $(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: parserlib
- go get github.com/etcd-io/gofail
- @$(GOFAIL_ENABLE)
- @export log_level=debug; \
- $(GOTEST) -timeout 20m -race $(PACKAGES) || { $(GOFAIL_DISABLE); exit 1; }
- @$(GOFAIL_DISABLE)
leak: parserlib
- go get github.com/etcd-io/gofail
- @$(GOFAIL_ENABLE)
- @export log_level=debug; \
- $(GOTEST) -tags leak $(PACKAGES) || { $(GOFAIL_DISABLE); exit 1; }
- @$(GOFAIL_DISABLE)
tikv_integration_test: parserlib
- go get github.com/etcd-io/gofail
- @$(GOFAIL_ENABLE)
- $(GOTEST) ./store/tikv/. -with-tikv=true || { $(GOFAIL_DISABLE); exit 1; }
- @$(GOFAIL_DISABLE)
RACE_FLAG =
ifeq ("$(WITH_RACE)", "1")