Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Shushlin <vshushlin@gitlab.com>2021-03-29 13:51:52 +0300
committerVladimir Shushlin <vshushlin@gitlab.com>2021-03-29 13:51:52 +0300
commit32d1c7b4d61cea0c9e097a1b968677205141c244 (patch)
treeb6811fb4ff03a789904868d68d7f3b3d799dc04a /Makefile.util.mk
parent08b7c91002fee0efb684028007eca2b456a884eb (diff)
parent63488757fe9c8eba78a0abc497f1f368f225d42d (diff)
Merge branch 'remove-gopath-from-makefile' into 'master'
Simplify Makefiles See merge request gitlab-org/gitlab-pages!453
Diffstat (limited to 'Makefile.util.mk')
-rw-r--r--Makefile.util.mk9
1 files changed, 4 insertions, 5 deletions
diff --git a/Makefile.util.mk b/Makefile.util.mk
index 8d470564..a2d7b838 100644
--- a/Makefile.util.mk
+++ b/Makefile.util.mk
@@ -1,5 +1,3 @@
-GOLANGCI_LINT_IMAGE := golangci/golangci-lint:$(GOLANGCI_LINT_VERSION)
-
.PHONY: lint test race acceptance bench cover list deps-check deps-download changelog
OUT_FORMAT ?= colored-line-number
@@ -10,8 +8,8 @@ lint: .GOPATH/.ok bin/golangci-lint
$Q ./bin/golangci-lint run ./... --out-format $(OUT_FORMAT) $(LINT_FLAGS) | tee ${REPORT_FILE}
test: .GOPATH/.ok gitlab-pages
- rm tests.out || true
- go test $(if $V,-v) $(allpackages) 2>&1 | tee tests.out
+ rm -f tests.out
+ go test $(if $V,-v) ./... ${ARGS} 2>&1 | tee tests.out
race: .GOPATH/.ok gitlab-pages
CGO_ENABLED=1 go test -race $(if $V,-v) $(allpackages) 2>&1 | tee tests.out
@@ -23,9 +21,10 @@ bench: .GOPATH/.ok gitlab-pages
go test -bench=. -run=^$$ $(allpackages)
# The acceptance tests cannot count for coverage
-cover: bin/gocovmerge .GOPATH/.ok gitlab-pages
+cover: bin/gocovmerge gitlab-pages
@echo "NOTE: make cover does not exit 1 on failure, don't use it to check for tests success!"
$Q rm -f .GOPATH/cover/*.out .GOPATH/cover/all.merged
+ $Q mkdir -p .GOPATH/cover
$(if $V,@echo "-- go test -coverpkg=./... -coverprofile=.GOPATH/cover/... ./...")
@for MOD in $(allpackages); do \
go test \