Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added static analysis tools testing
  • Loading branch information
bskari committed Apr 11, 2012
1 parent 604ac7b commit 85af80e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/tests/nightly/nightly.sh
Expand Up @@ -195,6 +195,31 @@ function runStress ()
set -e
}

function runStaticAnalysis ()
{
for staticAnalysisTool in \
'cppcheck --error-exitcode=1' \
'cpplint.py --filter=-whitespace/braces,-whitespace/parens,-whitespace/newline,-runtime/rtti';
do
if [ ! -z "$(which $staticAnalysisTool)" ];
then
pushd src
for sourceFile in *cpp *hpp;
do
set +e
$staticAnalysisTool $sourceFile
exitCode=$?
set -e
if [ $exitCode -ne 0 ];
then
saveMessage "$sourceFile failed $staticAnalysisTool" "../STATIC.txt"
fi
done
popd src
fi
done
}

function waitForLowLoad ()
{
waitCount=0
Expand All @@ -220,6 +245,8 @@ waitForLowLoad
cd ../../.. # Into main SQLassie directory
update

runStaticAnalysis

for version in RELEASE DEBUG ;
do
pushd src
Expand Down

0 comments on commit 85af80e

Please sign in to comment.