From: Eric Leblond Date: Mon, 9 Dec 2013 17:18:30 +0000 (+0100) Subject: coccinelle: add option to continue on errors X-Git-Tag: suricata-2.0beta2~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6378db89f6aa12ecba6635c3492eb5e5cceb3ae0;p=thirdparty%2Fsuricata.git 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 --- diff --git a/qa/coccinelle/run_check.sh b/qa/coccinelle/run_check.sh index da6d410e7c..79ec9cc6f0 100755 --- a/qa/coccinelle/run_check.sh +++ b/qa/coccinelle/run_check.sh @@ -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