test: Make test status more clear
This commit is contained in:
@@ -29,3 +29,4 @@ bad_files=$(
|
||||
if [[ -n "${bad_files}" ]]; then
|
||||
fail_test "The following bash files are not properly formatted: ${bad_files}"
|
||||
fi
|
||||
echo 'PASS'
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
echo running test-commit-message.sh
|
||||
|
||||
travis_regex='^\([a-z0-9]\(\(, \)\|[a-z0-9]\)\+[a-z0-9]: \)\+[A-Z0-9][^:]\+[^:.]$'
|
||||
|
||||
# Testing the regex itself.
|
||||
@@ -45,7 +47,7 @@ travis_regex='^\([a-z0-9]\(\(, \)\|[a-z0-9]\)\+[a-z0-9]: \)\+[A-Z0-9][^:]\+[^:.]
|
||||
[[ $(echo "nope a: bar, foo: barfoofoo: Nope" | grep -c "$travis_regex") -eq 0 ]]
|
||||
|
||||
test_commit_message() {
|
||||
echo Testing commit message $1
|
||||
echo "Testing commit message $1"
|
||||
if ! git log --format=%s $1 | head -n 1 | grep -q "$travis_regex"
|
||||
then
|
||||
echo "FAIL: Commit message should match the following regex: '$travis_regex'"
|
||||
@@ -67,3 +69,4 @@ then
|
||||
test_commit_message $commit
|
||||
done
|
||||
fi
|
||||
echo 'PASS'
|
||||
|
||||
@@ -27,3 +27,4 @@ bad_files=$(find_files | xargs $GOFMT -l)
|
||||
if [[ -n "${bad_files}" ]]; then
|
||||
fail_test "The following golang files are not properly formatted: ${bad_files}"
|
||||
fi
|
||||
echo 'PASS'
|
||||
|
||||
@@ -67,4 +67,4 @@ if [ "$DELTA" -gt "$THRESHOLD" ]; then
|
||||
echo "Maximum threshold is: $THRESHOLD %"
|
||||
fail_test "`golint` - FAILED"
|
||||
fi
|
||||
echo PASS
|
||||
echo 'PASS'
|
||||
|
||||
@@ -28,3 +28,4 @@ bad_files=$(
|
||||
if [[ -n "${bad_files}" ]]; then
|
||||
fail_test "The following file headers are not properly formatted: ${bad_files}"
|
||||
fi
|
||||
echo 'PASS'
|
||||
|
||||
@@ -18,4 +18,8 @@ done
|
||||
|
||||
# return to original dir
|
||||
cd "$CWD" >/dev/null
|
||||
exit $RET
|
||||
if [ ! $RET -eq 0 ]; then
|
||||
echo 'FAIL'
|
||||
exit $RET
|
||||
fi
|
||||
echo 'PASS'
|
||||
|
||||
@@ -36,4 +36,4 @@ if [[ -n "${failures}" ]]; then
|
||||
echo "${failures}"
|
||||
exit 1
|
||||
fi
|
||||
echo PASS
|
||||
echo 'PASS'
|
||||
|
||||
@@ -78,4 +78,4 @@ if [[ -n "${failures}" ]]; then
|
||||
echo "${failures}"
|
||||
exit 1
|
||||
fi
|
||||
echo PASS
|
||||
echo 'PASS'
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
# check for any yaml files that aren't properly formatted
|
||||
|
||||
exit 0 # i give up, we're skipping this entirely, help wanted to fix this
|
||||
|
||||
. test/util.sh
|
||||
|
||||
echo running test-yamlfmt.sh
|
||||
@@ -8,8 +10,6 @@ set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
exit 0 # i give up, we're skipping this entirely, help wanted to fix this
|
||||
|
||||
#if env | grep -q -e '^TRAVIS=true$' -e '^JENKINS_URL=' -e '^BUILD_TAG=jenkins'; then
|
||||
# echo "Travis and Jenkins give wonky results here, skipping test!"
|
||||
# exit 0
|
||||
@@ -63,3 +63,4 @@ bad_files=$(
|
||||
if [[ -n "${bad_files}" ]]; then
|
||||
fail_test "The following yaml files are not properly formatted: ${bad_files}"
|
||||
fi
|
||||
echo 'PASS'
|
||||
|
||||
Reference in New Issue
Block a user