2023-05-18 04:28:12 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
SCRIPT=$(realpath "$0")
|
|
|
|
SCRIPTPATH=$(dirname "$SCRIPT")
|
2023-05-18 17:28:17 -05:00
|
|
|
PATHS="$(find $SCRIPTPATH/.. \( -wholename '*/qa/*/testdocuments' -o -wholename '*/qa/*/testdocuments/*' -o -wholename '*/qa/*/data' -o -wholename '*/qa/*/data/*' \) -type d )"
|
2023-05-18 04:28:12 -05:00
|
|
|
|
2023-05-18 17:28:17 -05:00
|
|
|
for path in $PATHS
|
2023-05-18 04:28:12 -05:00
|
|
|
do
|
2023-05-18 17:27:10 -05:00
|
|
|
# Ignore pass/fail/indeterminate folders, functions test in sc, workdir folder and xml in sd
|
2023-05-18 04:28:12 -05:00
|
|
|
if [[ "$path" != */pass* ]] && [[ "$path" != */fail* ]] && [[ "$path" != */indeterminate* ]] \
|
|
|
|
&& [[ "$path" != */functions* ]] && [[ "$path" != */workdir* ]] && [[ "$path" != */xml* ]]; then
|
|
|
|
for i in $path/*
|
|
|
|
do
|
|
|
|
if [ -f "$i" ]; then
|
|
|
|
file=$(basename "$i")
|
|
|
|
if ! git grep -q "$file"; then
|
|
|
|
echo "WARNING: $i is not used, write a testcase for it!"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# vi:set shiftwidth=4 expandtab:
|