X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fscript%2Fcheck_commands.sh;fp=src%2Fceph%2Fsrc%2Fscript%2Fcheck_commands.sh;h=17a15b405e9e84d4c702fb604136eb297184bd29;hb=812ff6ca9fcd3e629e49d4328905f33eee8ca3f5;hp=0000000000000000000000000000000000000000;hpb=15280273faafb77777eab341909a3f495cf248d9;p=stor4nfv.git diff --git a/src/ceph/src/script/check_commands.sh b/src/ceph/src/script/check_commands.sh new file mode 100755 index 0000000..17a15b4 --- /dev/null +++ b/src/ceph/src/script/check_commands.sh @@ -0,0 +1,19 @@ +#!/bin/sh +git grep COMMAND\( | grep -o "(\"[a-zA-z ]*\"" | grep -o "[a-zA-z ]*" > commands.txt +missing_test=false +good_tests="" +bad_tests="" +while read cmd; do + if git grep -q "$cmd" -- src/test qa/; then + good_tests="$good_tests '$cmd'" + else + echo "'$cmd' has no apparent tests" + missing_test=true + bad_tests="$bad_tests '$cmd'" + fi +done < commands.txt + +if [ "$missing_test" == true ]; then + echo "Missing tests!" $bad_tests + exit 1; +fi