cppcheck/test/cfg/runtests.sh

19 lines
496 B
Bash
Raw Normal View History

#!/bin/bash
set -e # abort on error
if [[ `pwd` == */test/cfg ]] ; then # we are in test/cfg
CPPCHECK="../../cppcheck"
DIR=""
else # assume we are in repo root
CPPCHECK="./cppcheck"
DIR=./test/cfg/
fi
2015-01-30 06:43:40 +01:00
# posix.c
gcc -fsyntax-only ${DIR}posix.c
${CPPCHECK} --check-library --library=posix --enable=information --error-exitcode=1 --inline-suppr ${DIR}posix.c
# std.c
gcc -fsyntax-only ${DIR}std.c
${CPPCHECK} --check-library --enable=information --error-exitcode=1 --inline-suppr ${DIR}std.c