]> git.proxmox.com Git - ceph.git/blame - ceph/src/script/check_commands.sh
import 15.2.0 Octopus source
[ceph.git] / ceph / src / script / check_commands.sh
CommitLineData
31f18b77 1#!/bin/sh
9f95a23c
TL
2
3git grep -e COMMAND\( -e COMMAND_WITH_FLAG\( | grep -o "(\"[a-zA-Z ]*\"" | grep -o "[a-zA-Z ]*" | sort | uniq > commands.txt
31f18b77
FG
4missing_test=false
5good_tests=""
6bad_tests=""
7while read cmd; do
8 if git grep -q "$cmd" -- src/test qa/; then
9 good_tests="$good_tests '$cmd'"
10 else
11 echo "'$cmd' has no apparent tests"
12 missing_test=true
13 bad_tests="$bad_tests '$cmd'"
14 fi
15done < commands.txt
16
17if [ "$missing_test" == true ]; then
18 echo "Missing tests!" $bad_tests
19 exit 1;
20fi