Make sure to error on test

This works around set -e not working in this scenario.
This commit is contained in:
James Shubin
2016-02-22 00:59:36 -05:00
parent 74aadbadb8
commit ce0d68a8ba
2 changed files with 8 additions and 2 deletions

View File

@@ -16,8 +16,7 @@ diff <(tail -n +$start AUTHORS | sort) <(tail -n +$start AUTHORS)
./test/test-bashfmt.sh
./test/test-headerfmt.sh
go test
echo running go vet # since it doesn't output an ok message on pass
go vet && echo PASS
./test/test-govet.sh
# do these longer tests only when running on ci
if env | grep -q -e '^TRAVIS=true$' -e '^JENKINS_URL=' -e '^BUILD_TAG=jenkins'; then

7
test/test-govet.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
# check that go vet passes
echo running test-govet.sh
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )" # dir!
cd "${ROOT}"
go vet && echo PASS || exit 1 # since it doesn't output an ok message on pass