Skip to content
Snippets Groups Projects
Commit 77a24654 authored by Will Rouesnel's avatar Will Rouesnel
Browse files

Fix regression where failed tests would still leave passing builds.

parent ea4cefe5
No related merge requests found
......@@ -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
......@@ -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) .
......
......@@ -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% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment