coccinelle: add option to continue on errors

When a script has been updated or introduced, it is interesting to
detect all errors at once. With this patch it is now possible to
do so by using:
   NOT_TERMINAL=1 CONCURRENCY_LEVEL=12  qa/coccinelle/run_check.sh
pull/677/merge
Eric Leblond 13 years ago committed by Victor Julien
parent 28c5c68192
commit 6378db89f6

@ -29,10 +29,10 @@ fi
for SMPL in $(git rev-parse --show-toplevel)/qa/coccinelle/*.cocci; do
echo "Testing cocci file: $SMPL"
if command -v parallel >/dev/null; then
echo -n $LIST | parallel -d ' ' -j $CONCURRENCY_LEVEL spatch --very-quiet -sp_file $SMPL --undefined UNITTESTS $PREFIX{} || exit 1;
echo -n $LIST | parallel -d ' ' -j $CONCURRENCY_LEVEL spatch --very-quiet -sp_file $SMPL --undefined UNITTESTS $PREFIX{} || if [ -z "$NOT_TERMINAL" ]; then exit 1; fi
else
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 || if [ -z "$NOT_TERMINAL" ]; then exit 1; fi
done
fi
done

Loading…
Cancel
Save