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
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