Small nitpick fixups
This commit is contained in:
20
test.sh
20
test.sh
@@ -4,9 +4,10 @@ echo running test.sh
|
|||||||
echo "ENV:"
|
echo "ENV:"
|
||||||
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
|
# 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
|
if env | grep -q -e '^TRAVIS=true$' -e '^JENKINS_URL=' -e '^BUILD_TAG=jenkins'; then
|
||||||
run-test go test -race
|
run-test go test -race
|
||||||
run-test ./test/test-shell.sh
|
run-test ./test/test-shell.sh
|
||||||
else
|
|
||||||
# FIXME: this fails on travis for some reason
|
|
||||||
run-test ./test/test-reproducible.sh
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# FIXME: this now fails everywhere :(
|
||||||
|
#run-test ./test/test-reproducible.sh
|
||||||
|
|
||||||
# run omv tests on jenkins physical hosts only
|
# run omv tests on jenkins physical hosts only
|
||||||
if env | grep -q -e '^JENKINS_URL=' -e '^BUILD_TAG=jenkins'; then
|
if env | grep -q -e '^JENKINS_URL=' -e '^BUILD_TAG=jenkins'; then
|
||||||
run-test ./test/test-omv.sh
|
run-test ./test/test-omv.sh
|
||||||
fi
|
fi
|
||||||
run-test ./test/test-golint.sh # test last, because this test is somewhat arbitrary
|
run-test ./test/test-golint.sh # test last, because this test is somewhat arbitrary
|
||||||
|
|
||||||
if [ "$FAILURES" ] ; then
|
if [[ -n "$failures" ]]; then
|
||||||
echo
|
echo 'FAIL'
|
||||||
echo "FAILED TESTS:"
|
echo 'The following tests have failed:'
|
||||||
echo -e $FAILURES
|
echo -e "$failures"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
echo 'ALL PASSED'
|
||||||
|
|||||||
Reference in New Issue
Block a user