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:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2021-04-15 00:24:09 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2021-04-20 14:05:52 +0300
commit8e83053055ab3f48232eb115e51aeb7532fe301c (patch)
tree2c76d636e8ed2a26c43d152f4d84641833df6d22
parentbda06683de6d93aeaff8d3c7357983ed7f0ccfc7 (diff)
Remove gocovmerge
Changelog: other
-rw-r--r--Makefile.internal.mk6
-rw-r--r--Makefile.util.mk19
-rw-r--r--doc/dependency_decisions.yml7
-rw-r--r--go.mod1
-rw-r--r--go.sum2
-rw-r--r--tools.go1
6 files changed, 7 insertions, 29 deletions
diff --git a/Makefile.internal.mk b/Makefile.internal.mk
index 88aecad2..40e1daae 100644
--- a/Makefile.internal.mk
+++ b/Makefile.internal.mk
@@ -24,11 +24,7 @@ Q := $(if $V,,@)
.GOPATH/.ok:
mkdir -p .GOPATH
-.PHONY: bin/gocovmerge bin/golangci-lint
-bin/gocovmerge: .GOPATH/.ok
- @test -x $@ || \
- { echo "Vendored gocovmerge not found, try running 'make setup'..."; exit 1; }
-
+.PHONY: bin/golangci-lint
bin/golangci-lint: .GOPATH/.ok
@test -x $@ || \
{ echo "Vendored golangci-lint not found, try running 'make setup'..."; exit 1; }
diff --git a/Makefile.util.mk b/Makefile.util.mk
index a2d7b838..781e9abd 100644
--- a/Makefile.util.mk
+++ b/Makefile.util.mk
@@ -3,6 +3,7 @@
OUT_FORMAT ?= colored-line-number
LINT_FLAGS ?= $(if $V,-v)
REPORT_FILE ?=
+COVERAGE_PACKAGES=$(shell (go list ./... | grep -v $(addprefix -e ,$(IGNORED_DIRS) "test/acceptance") | tr "\n", "," | sed 's/\(.*\),/\1 /'))
lint: .GOPATH/.ok bin/golangci-lint
$Q ./bin/golangci-lint run ./... --out-format $(OUT_FORMAT) $(LINT_FLAGS) | tee ${REPORT_FILE}
@@ -21,24 +22,16 @@ bench: .GOPATH/.ok gitlab-pages
go test -bench=. -run=^$$ $(allpackages)
# The acceptance tests cannot count for coverage
-cover: bin/gocovmerge gitlab-pages
+cover: 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 rm -f .GOPATH/cover/test.coverage
$Q mkdir -p .GOPATH/cover
- $(if $V,@echo "-- go test -coverpkg=./... -coverprofile=.GOPATH/cover/... ./...")
- @for MOD in $(allpackages); do \
- go test \
- -short \
- -coverpkg=`echo $(allpackages)|tr " " ","` \
- -coverprofile=.GOPATH/cover/unit-`echo $$MOD|tr "/" "_"`.out \
- $$MOD 2>&1 | grep -v "no packages being tested depend on"; \
- done
- $Q ./bin/gocovmerge .GOPATH/cover/*.out > .GOPATH/cover/all.merged
- $Q go tool cover -html .GOPATH/cover/all.merged -o coverage.html
+ $Q go test -short -cover -coverpkg=$(COVERAGE_PACKAGES) -coverprofile=.GOPATH/cover/test.coverage $(allpackages)
+ $Q go tool cover -html .GOPATH/cover/test.coverage -o coverage.html
@echo ""
@echo "=====> Total test coverage: <====="
@echo ""
- $Q go tool cover -func .GOPATH/cover/all.merged
+ $Q go tool cover -func .GOPATH/cover/test.coverage
list: .GOPATH/.ok
@echo $(allpackages)
diff --git a/doc/dependency_decisions.yml b/doc/dependency_decisions.yml
index 4137ba12..69231c06 100644
--- a/doc/dependency_decisions.yml
+++ b/doc/dependency_decisions.yml
@@ -111,13 +111,6 @@
:versions: []
:when: 2019-09-11 12:58:33.840590099 Z
- - :license
- - github.com/wadey/gocovmerge
- - BSD-2
- - :who:
- :why:
- :versions: []
- :when: 2019-09-17 14:53:25.294515000 Z
-- - :license
- gopkg.in/check.v1
- BSD-2-Clause
- :who: Krasimir Angelov
diff --git a/go.mod b/go.mod
index 266b9107..485fb855 100644
--- a/go.mod
+++ b/go.mod
@@ -27,7 +27,6 @@ require (
github.com/tj/assert v0.0.3 // indirect
github.com/tj/go-redirects v0.0.0-20180508180010-5c02ead0bbc5
github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce
- github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad
gitlab.com/gitlab-org/go-mimedb v1.45.0
gitlab.com/gitlab-org/labkit v1.3.0
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
diff --git a/go.sum b/go.sum
index 2e943aa0..e995bc3a 100644
--- a/go.sum
+++ b/go.sum
@@ -485,8 +485,6 @@ github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBn
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
github.com/valyala/quicktemplate v1.2.0/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4=
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
-github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad h1:W0LEBv82YCGEtcmPA3uNZBI33/qF//HAAs3MawDjRa0=
-github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad/go.mod h1:Hy8o65+MXnS6EwGElrSRjUzQDLXreJlzYLlWiHtt8hM=
github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0 h1:3UeQBvD0TFrlVjOeLOBz+CPAI8dnbqNSVwUwRrkp7vQ=
github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0/go.mod h1:IXCdmsXIht47RaVFLEdVnh1t+pgYtTAhQGj73kz+2DM=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
diff --git a/tools.go b/tools.go
index 0cc95532..54336cb9 100644
--- a/tools.go
+++ b/tools.go
@@ -9,6 +9,5 @@ import (
_ "github.com/golang/mock/mockgen"
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
_ "github.com/jstemmer/go-junit-report"
- _ "github.com/wadey/gocovmerge"
_ "golang.org/x/tools/cmd/goimports"
)