diff options
author | Tim Angus <tim.angus@roslin.ed.ac.uk> | 2014-08-27 16:48:55 +0100 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-08-28 11:20:29 +0100 |
commit | 6edcf7b161eb9f6bef4aef3900aae963aa71eea7 (patch) | |
tree | 88a31f2b735c03ac42834bb1153054f5674b574f | |
parent | 69aebaacc7b5926d4120f764fc3194dcf3e03d53 (diff) |
Add cppcheck stage to jenkins script
-rwxr-xr-x | jenkins-ci-build.sh | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/jenkins-ci-build.sh b/jenkins-ci-build.sh index fb922f25..4a416c4e 100755 --- a/jenkins-ci-build.sh +++ b/jenkins-ci-build.sh @@ -8,8 +8,8 @@ cd ${MASTER_DIR} if [ "$OPTIONS" = "all_options" ]; then - export USE_CODEC_VORBIS=1 - export USE_FREETYPE=1 + export USE_CODEC_VORBIS=1 + export USE_FREETYPE=1 fi if [ "$UNAME" == "Darwin" ]; then @@ -27,6 +27,22 @@ else echo "build type : ${BUILD_TYPE}" fi +if [ -n "${CPPCHECK}" ]; then + if [ -e "${CPPCHECK}" ]; then + # Copy the existing output + BASENAME_CPPCHECK=`basename ${CPPCHECK}` + cp ${CPPCHECK} ./${BASENAME_CPPCHECK} + else + CHECK_CPPCHECK=`command -v cppcheck >/dev/null` + if [ "$?" != "0" ]; then + echo "cppcheck not installed" + exit 1 + fi + + cppcheck --enable=all --max-configs=1 --xml --xml-version=2 ./code 2> ${CPPCHECK} + fi +fi + make -j${CORES} distclean ${BUILD_TYPE} exit $? |