fix shell usage in make file

This commit is contained in:
Matthias Berkenkamp 2017-08-01 10:43:46 +02:00 committed by Will Rouesnel
parent 4bee618699
commit 6e3d130f40
3 changed files with 6 additions and 2 deletions

View File

1
.gitignore vendored
View File

@ -8,5 +8,6 @@ postgres_exporter_integration_test
*.iml
cover.out
cover.*.out
.coverage
*.prom
.metrics.*.*.prom

View File

@ -42,11 +42,14 @@ lint: tools
fmt: tools
gofmt -s -w $(GO_SRC)
test: tools
run-tests: tools
mkdir -p $(COVERDIR)
rm -f $(COVERDIR)/*
for pkg in $(GO_PKGS) ; do \
go test -v -covermode count -coverprofile=$(COVERDIR)/$$(echo $$pkg | tr '/' '-').out $$pkg ; \
done
test: run-tests
gocovmerge $(shell find $(COVERDIR) -name '*.out') > cover.test.out
test-integration: postgres_exporter postgres_exporter_integration_test
@ -73,6 +76,6 @@ tools:
$(MAKE) -C $(TOOLDIR)
clean:
rm -f postgres_exporter postgres_exporter_integration_test
rm -rf postgres_exporter postgres_exporter_integration_test $(COVERDIR)
.PHONY: tools docker-build docker lint fmt test vet push cross clean