diff --git a/.travis.yml b/.travis.yml index 8d86d668..f2d36561 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ script: - make all - make docker - make test-integration -- ./concatenate_coverage cover.out cover.test.out cover.integration.out +- make cover.out - $HOME/gopath/bin/goveralls -coverprofile=cover.out -service=travis-ci after_success: - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS diff --git a/Makefile b/Makefile index c38bac30..26ccb8a6 100644 --- a/Makefile +++ b/Makefile @@ -48,11 +48,14 @@ test: tools for pkg in $(GO_PKGS) ; do \ go test -v -covermode count -coverprofile=$(COVERDIR)/$$(echo $$pkg | tr '/' '-').out $$pkg ; \ done - gocovmerge $(shell find $(COVERDIR) -name '*.out') > cover.out + gocovmerge $(shell find $(COVERDIR) -name '*.out') > cover.test.out test-integration: postgres_exporter postgres_exporter_integration_test tests/test-smoke "$(shell pwd)/postgres_exporter" "$(shell pwd)/postgres_exporter_integration_test_script $(shell pwd)/postgres_exporter_integration_test $(shell pwd)/cover.integration.out" +cover.out: tools + gocovmerge cover.*.out > cover.out + # Do a self-contained docker build - we pull the official upstream container # and do a self-contained build. docker-build: