mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-04-19 21:45:25 +00:00
Fix regression where failed tests would still leave passing builds.
This commit is contained in:
parent
2d3aa082b1
commit
97708205f6
4
Makefile
4
Makefile
@ -46,7 +46,7 @@ run-tests: tools
|
|||||||
mkdir -p $(COVERDIR)
|
mkdir -p $(COVERDIR)
|
||||||
rm -f $(COVERDIR)/*
|
rm -f $(COVERDIR)/*
|
||||||
for pkg in $(GO_PKGS) ; do \
|
for pkg in $(GO_PKGS) ; do \
|
||||||
go test -v -covermode count -coverprofile=$(COVERDIR)/$$(echo $$pkg | tr '/' '-').out $$pkg ; \
|
go test -v -covermode count -coverprofile=$(COVERDIR)/$$(echo $$pkg | tr '/' '-').out $$pkg || exit 1 ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
test: run-tests
|
test: run-tests
|
||||||
@ -65,7 +65,7 @@ docker-build:
|
|||||||
-v $(shell pwd):/real_src \
|
-v $(shell pwd):/real_src \
|
||||||
-e SHELL_UID=$(shell id -u) -e SHELL_GID=$(shell id -g) \
|
-e SHELL_UID=$(shell id -u) -e SHELL_GID=$(shell id -g) \
|
||||||
-w /go/src/github.com/wrouesnel/postgres_exporter \
|
-w /go/src/github.com/wrouesnel/postgres_exporter \
|
||||||
golang:1.8-wheezy \
|
golang:1.9-wheezy \
|
||||||
/bin/bash -c "make >&2 && chown $$SHELL_UID:$$SHELL_GID ./postgres_exporter"
|
/bin/bash -c "make >&2 && chown $$SHELL_UID:$$SHELL_GID ./postgres_exporter"
|
||||||
docker build -t $(CONTAINER_NAME) .
|
docker build -t $(CONTAINER_NAME) .
|
||||||
|
|
||||||
|
@ -10,6 +10,6 @@ shift
|
|||||||
echo "mode: count" > $output_cov
|
echo "mode: count" > $output_cov
|
||||||
|
|
||||||
test_cov=$(mktemp)
|
test_cov=$(mktemp)
|
||||||
$test_binary -test.coverprofile=$test_cov $@
|
$test_binary -test.coverprofile=$test_cov $@ || exit 1
|
||||||
tail -n +2 $test_cov >> $output_cov
|
tail -n +2 $test_cov >> $output_cov
|
||||||
rm -f $test_cov
|
rm -f $test_cov
|
||||||
|
Loading…
Reference in New Issue
Block a user