From: Eric Leblond Date: Fri, 9 Nov 2012 17:41:52 +0000 (+0100) Subject: coccinelle: fix distcheck X-Git-Tag: suricata-1.4beta3~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7293040ed8def6b2ebb112ecf2b573f1aa17677f;p=thirdparty%2Fsuricata.git coccinelle: fix distcheck distcheck is running run_check.sh from another directory and run_check.sh was not ready for this. --- diff --git a/qa/coccinelle/run_check.sh b/qa/coccinelle/run_check.sh index a125cdbc85..d233b6bf9f 100755 --- a/qa/coccinelle/run_check.sh +++ b/qa/coccinelle/run_check.sh @@ -7,19 +7,19 @@ if [ $1 ]; then ;; *..*) 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]$') - PREFIX="../../" + PREFIX=$(git rev-parse --show-toplevel)/ ;; esac else LIST=$(git ls-tree -r --name-only --full-tree HEAD src/ | grep -E '*.c$') - PREFIX="../../" + PREFIX=$(git rev-parse --show-toplevel)/ fi -for SMPL in *.cocci; do +for SMPL in $(git rev-parse --show-toplevel)/qa/coccinelle/*.cocci; do echo "Testing cocci file: $SMPL" for FILE in $LIST ; do spatch --very-quiet -sp_file $SMPL --undefined UNITTESTS $PREFIX$FILE || exit 1;