Skip to content

Commit

Permalink
Fix regression where failed tests would still leave passing builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
wrouesnel committed Oct 9, 2017
1 parent ea4cefe commit 77a2465
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -46,7 +46,7 @@ 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 ; \
go test -v -covermode count -coverprofile=$(COVERDIR)/$$(echo $$pkg | tr '/' '-').out $$pkg || exit 1 ; \
done

test: run-tests
Expand All @@ -65,7 +65,7 @@ docker-build:
-v $(shell pwd):/real_src \
-e SHELL_UID=$(shell id -u) -e SHELL_GID=$(shell id -g) \
-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"
docker build -t $(CONTAINER_NAME) .

Expand Down
2 changes: 1 addition & 1 deletion postgres_exporter_integration_test_script
Expand Up @@ -10,6 +10,6 @@ shift
echo "mode: count" > $output_cov

test_cov=$(mktemp)
$test_binary -test.coverprofile=$test_cov $@
$test_binary -test.coverprofile=$test_cov $@ || exit 1
tail -n +2 $test_cov >> $output_cov
rm -f $test_cov

0 comments on commit 77a2465

Please sign in to comment.