|
|
@ -127,31 +127,28 @@ go.lint: tools.verify.golangci-lint
|
|
|
|
@echo "===========> Run golangci to lint source codes"
|
|
|
|
@echo "===========> Run golangci to lint source codes"
|
|
|
|
@$(TOOLS_DIR)/golangci-lint run -c $(ROOT_DIR)/.golangci.yml $(ROOT_DIR)/...
|
|
|
|
@$(TOOLS_DIR)/golangci-lint run -c $(ROOT_DIR)/.golangci.yml $(ROOT_DIR)/...
|
|
|
|
|
|
|
|
|
|
|
|
# # @$(GO) test $(GO_BUILD_FLAGS) ./...
|
|
|
|
|
|
|
|
# ## go.test: Run unit test
|
|
|
|
|
|
|
|
# .PHONY: go.test
|
|
|
|
|
|
|
|
# go.test: tools.verify.go-junit-report
|
|
|
|
|
|
|
|
# @echo "===========> Run unit test"
|
|
|
|
|
|
|
|
# @set -o pipefail;$(GO) test -race -cover -coverprofile=$(OUTPUT_DIR)/coverage.out \
|
|
|
|
|
|
|
|
# -timeout=10m -shuffle=on -short -v `go list ./...|\
|
|
|
|
|
|
|
|
# egrep -v $(subst $(SPACE),'|',$(sort $(EXCLUDE_TESTS)))` 2>&1 | \
|
|
|
|
|
|
|
|
# tee >(go-junit-report --set-exit-code >$(OUTPUT_DIR)/report.xml)
|
|
|
|
|
|
|
|
# @sed -i '/mock_.*.go/d' $(OUTPUT_DIR)/coverage.out # remove mock_.*.go files from test coverage
|
|
|
|
|
|
|
|
# @$(GO) tool cover -html=$(OUTPUT_DIR)/coverage.out -o $(OUTPUT_DIR)/coverage.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## go.test: Run unit test
|
|
|
|
## go.test: Run unit test
|
|
|
|
.PHONY: go.test
|
|
|
|
.PHONY: go.test
|
|
|
|
go.test:
|
|
|
|
go.test:
|
|
|
|
@$(GO) test ./...
|
|
|
|
@$(GO) test ./...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ## go.test.junit-report: Run unit test
|
|
|
|
|
|
|
|
# .PHONY: go.test.junit-report
|
|
|
|
|
|
|
|
# go.test.junit-report: tools.verify.go-junit-report
|
|
|
|
|
|
|
|
# @echo "===========> Run unit test > $(TMP_DIR)/report.xml"
|
|
|
|
|
|
|
|
# @$(GO) test -v -coverprofile=$(TMP_DIR)/coverage.out 2>&1 $(GO_BUILD_FLAGS) ./... | $(TOOLS_DIR)/go-junit-report -set-exit-code > $(TMP_DIR)/report.xml
|
|
|
|
|
|
|
|
# @sed -i '/mock_.*.go/d' $(TMP_DIR)/coverage.out
|
|
|
|
|
|
|
|
# @echo "===========> Test coverage of Go code is reported to $(TMP_DIR)/coverage.html by generating HTML"
|
|
|
|
|
|
|
|
# @$(GO) tool cover -html=$(TMP_DIR)/coverage.out -o $(TMP_DIR)/coverage.html
|
|
|
|
|
|
|
|
|
|
|
|
## go.test.junit-report: Run unit test
|
|
|
|
## go.test.junit-report: Run unit test
|
|
|
|
.PHONY: go.test.junit-report
|
|
|
|
.PHONY: go.test.junit-report
|
|
|
|
go.test.junit-report: tools.verify.go-junit-report
|
|
|
|
go.test.junit-report: tools.verify.go-junit-report
|
|
|
|
@echo "===========> Run unit test > $(TMP_DIR)/report.xml"
|
|
|
|
@echo "===========> Run unit test > $(OUTPUT_DIR)/report.xml"
|
|
|
|
@$(GO) test -v -coverprofile=$(TMP_DIR)/coverage.out 2>&1 $(GO_BUILD_FLAGS) ./... | $(TOOLS_DIR)/go-junit-report -set-exit-code > $(TMP_DIR)/report.xml
|
|
|
|
@$(GO) test -v -coverprofile=$(OUTPUT_DIR)/coverage.out 2>&1 ./... | $(TOOLS_DIR)/go-junit-report -set-exit-code > $(OUTPUT_DIR)/report.xml
|
|
|
|
@sed -i '/mock_.*.go/d' $(TMP_DIR)/coverage.out
|
|
|
|
@sed -i '/mock_.*.go/d' $(OUTPUT_DIR)/coverage.out
|
|
|
|
@echo "===========> Test coverage of Go code is reported to $(TMP_DIR)/coverage.html by generating HTML"
|
|
|
|
@echo "===========> Test coverage of Go code is reported to $(OUTPUT_DIR)/coverage.html by generating HTML"
|
|
|
|
@$(GO) tool cover -html=$(TMP_DIR)/coverage.out -o $(TMP_DIR)/coverage.html
|
|
|
|
@$(GO) tool cover -html=$(OUTPUT_DIR)/coverage.out -o $(OUTPUT_DIR)/coverage.html
|
|
|
|
|
|
|
|
|
|
|
|
## go.test.cover: Run unit test with coverage
|
|
|
|
## go.test.cover: Run unit test with coverage
|
|
|
|
.PHONY: go.test.cover
|
|
|
|
.PHONY: go.test.cover
|
|
|
|