Add cppcheck stage to jenkins script
This commit is contained in:
parent
86b75ba936
commit
19ee6a86eb
|
@ -8,8 +8,8 @@ cd ${MASTER_DIR}
|
||||||
|
|
||||||
if [ "$OPTIONS" = "all_options" ];
|
if [ "$OPTIONS" = "all_options" ];
|
||||||
then
|
then
|
||||||
export USE_CODEC_VORBIS=1
|
export USE_CODEC_VORBIS=1
|
||||||
export USE_FREETYPE=1
|
export USE_FREETYPE=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$UNAME" == "Darwin" ]; then
|
if [ "$UNAME" == "Darwin" ]; then
|
||||||
|
@ -27,6 +27,22 @@ else
|
||||||
echo "build type : ${BUILD_TYPE}"
|
echo "build type : ${BUILD_TYPE}"
|
||||||
fi
|
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}
|
make -j${CORES} distclean ${BUILD_TYPE}
|
||||||
|
|
||||||
exit $?
|
exit $?
|
||||||
|
|
Loading…
Reference in New Issue