Enabling vera++ run during precommit testing.

This commit is contained in:
Ruben Ayrapetyan 2015-02-17 19:56:41 +03:00
parent ef004ef843
commit 8b38cd036b

View File

@ -26,6 +26,26 @@ shift
PARSE_ONLY_TESTING_PATHS="./tests/benchmarks/jerry"
FULL_TESTING_PATHS="./tests/jerry ./tests/jerry-test-suite/precommit_test_list"
VERA=`which vera++`
if [ -x "$VERA" ]
then
VERA_DIRECTORIES_EXCLUDE_LIST="-path ./third-party -o -path tests"
VERA_SCRIPTS_PATH="./tools/vera++"
SOURCES_AND_HEADERS_LIST=`find . -type d \( $VERA_DIRECTORIES_EXCLUDE_LIST \) -prune -or -name "*.c" -or -name "*.cpp" -or -name "*.h"`
vera++ -r $VERA_SCRIPTS_PATH -p jerry $SOURCES_AND_HEADERS_LIST -e --no-duplicate
STATUS_CODE=$?
if [ $STATUS_CODE -ne 0 ]
then
echo -e "\e[1;33m vera++ static checks failed. See output above for details. \e[0m\n"
exit $STATUS_CODE
fi
else
echo -e "\e[1;33m Warning: vera++ not installed, skipping corresponding static checks. \e[0m\n"
fi
echo -e "\nBuilding...\n\n"
$MAKE STATIC_CHECK=ON build || exit 1
echo -e "\n================ Build completed successfully. Running precommit tests ================\n"