|
|
|
@ -7,19 +7,19 @@ if [ $1 ]; then
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
*..*)
|
|
|
|
*..*)
|
|
|
|
LIST=$(git diff --pretty="format:" --name-only $1 | grep -E '[ch]$')
|
|
|
|
LIST=$(git diff --pretty="format:" --name-only $1 | grep -E '[ch]$')
|
|
|
|
PREFIX="../../"
|
|
|
|
PREFIX=$(git rev-parse --show-toplevel)/
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
*)
|
|
|
|
LIST=$(git show --pretty="format:" --name-only $1 | grep -E '[ch]$')
|
|
|
|
LIST=$(git show --pretty="format:" --name-only $1 | grep -E '[ch]$')
|
|
|
|
PREFIX="../../"
|
|
|
|
PREFIX=$(git rev-parse --show-toplevel)/
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
else
|
|
|
|
LIST=$(git ls-tree -r --name-only --full-tree HEAD src/ | grep -E '*.c$')
|
|
|
|
LIST=$(git ls-tree -r --name-only --full-tree HEAD src/ | grep -E '*.c$')
|
|
|
|
PREFIX="../../"
|
|
|
|
PREFIX=$(git rev-parse --show-toplevel)/
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
for SMPL in *.cocci; do
|
|
|
|
for SMPL in $(git rev-parse --show-toplevel)/qa/coccinelle/*.cocci; do
|
|
|
|
echo "Testing cocci file: $SMPL"
|
|
|
|
echo "Testing cocci file: $SMPL"
|
|
|
|
for FILE in $LIST ; do
|
|
|
|
for FILE in $LIST ; do
|
|
|
|
spatch --very-quiet -sp_file $SMPL --undefined UNITTESTS $PREFIX$FILE || exit 1;
|
|
|
|
spatch --very-quiet -sp_file $SMPL --undefined UNITTESTS $PREFIX$FILE || exit 1;
|
|
|
|
|