mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-17 12:17:39 +00:00
Bring coverage back!
This commit is contained in:
+2
-1
@@ -22,4 +22,5 @@ _testmain.go
|
|||||||
*.exe
|
*.exe
|
||||||
*.test
|
*.test
|
||||||
|
|
||||||
coverage.html
|
coverage.html
|
||||||
|
coverage*.out
|
||||||
@@ -6,15 +6,13 @@ else
|
|||||||
GOVERALLS?=goveralls
|
GOVERALLS?=goveralls
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Disable coverage in Redis until I figure out go tool cover + multiple
|
ifeq ($(GOVERSION), go1.2)
|
||||||
# packages
|
TRAVIS_TARGET=coveralls
|
||||||
#ifeq ($(GOVERSION), go1.2)
|
PREPARE_LIST=cover-prepare
|
||||||
#TRAVIS_TARGET=coveralls
|
else
|
||||||
#PREPARE_LIST=cover-prepare
|
|
||||||
#else
|
|
||||||
TRAVIS_TARGET=test
|
TRAVIS_TARGET=test
|
||||||
PREPARE_LIST=
|
PREPARE_LIST=
|
||||||
#endif
|
endif
|
||||||
|
|
||||||
all: test check
|
all: test check
|
||||||
|
|
||||||
@@ -28,8 +26,14 @@ cover-prepare:
|
|||||||
go get github.com/axw/gocov/gocov
|
go get github.com/axw/gocov/gocov
|
||||||
go get code.google.com/p/go.tools/cmd/cover
|
go get code.google.com/p/go.tools/cmd/cover
|
||||||
|
|
||||||
coverage:
|
coverage.out:
|
||||||
go test -coverprofile=coverage.out
|
go test -coverprofile=coverage.debian.out ./debian
|
||||||
|
go test -coverprofile=coverage.utils.out ./utils
|
||||||
|
go test -coverprofile=coverage.database.out ./database
|
||||||
|
echo "mode: set" > coverage.out
|
||||||
|
grep -v -h "mode: set" coverage.*.out >> coverage.out
|
||||||
|
|
||||||
|
coverage: coverage.out
|
||||||
go tool cover -html=coverage.out
|
go tool cover -html=coverage.out
|
||||||
rm -f coverage.out
|
rm -f coverage.out
|
||||||
|
|
||||||
@@ -42,7 +46,7 @@ travis: $(TRAVIS_TARGET)
|
|||||||
test:
|
test:
|
||||||
go test -v ./... -gocheck.v=true
|
go test -v ./... -gocheck.v=true
|
||||||
|
|
||||||
coveralls:
|
coveralls: coverage.out
|
||||||
@$(GOVERALLS) -service travis-ci.org -package="./..." $(COVERALLS_TOKEN)
|
@$(GOVERALLS) -service travis-ci.org -coverprofile=coverage.out $(COVERALLS_TOKEN)
|
||||||
|
|
||||||
.PHONY: prepare cover-prepare coverage check test coveralls travis
|
.PHONY: coverage.out
|
||||||
Reference in New Issue
Block a user