Small nitpick fixups

This commit is contained in:
James Shubin
2016-04-07 21:08:26 -04:00
parent d84caa5528
commit d0c9b7170c

20
test.sh
View File

@@ -4,9 +4,10 @@ echo running test.sh
echo "ENV:"
env
run-test()
failures=''
function run-test()
{
$@ || FAILURES=$( [ "$FAILURES" ] && echo "$FAILURES\\n$@" || echo "$@" )
$@ || failures=$( [ -n "$failures" ] && echo "$failures\\n$@" || echo "$@" )
}
# ensure there is no trailing whitespace or other whitespace errors
@@ -27,20 +28,21 @@ run-test ./test/test-govet.sh
if env | grep -q -e '^TRAVIS=true$' -e '^JENKINS_URL=' -e '^BUILD_TAG=jenkins'; then
run-test go test -race
run-test ./test/test-shell.sh
else
# FIXME: this fails on travis for some reason
run-test ./test/test-reproducible.sh
fi
# FIXME: this now fails everywhere :(
#run-test ./test/test-reproducible.sh
# run omv tests on jenkins physical hosts only
if env | grep -q -e '^JENKINS_URL=' -e '^BUILD_TAG=jenkins'; then
run-test ./test/test-omv.sh
fi
run-test ./test/test-golint.sh # test last, because this test is somewhat arbitrary
if [ "$FAILURES" ] ; then
echo
echo "FAILED TESTS:"
echo -e $FAILURES
if [[ -n "$failures" ]]; then
echo 'FAIL'
echo 'The following tests have failed:'
echo -e "$failures"
exit 1
fi
echo 'ALL PASSED'