Index: build/build.sh =================================================================== diff -u -r4a61813cbfcdf2e2b230faaebe8fddf1d2695dd5 -rf13e17f1c40681ee9fb2769aab850c0b1144040d --- build/build.sh (.../build.sh) (revision 4a61813cbfcdf2e2b230faaebe8fddf1d2695dd5) +++ build/build.sh (.../build.sh) (revision f13e17f1c40681ee9fb2769aab850c0b1144040d) @@ -1,5 +1,5 @@ #!/bin/bash -# $./run.unittest.sh release 5.12.5 /media/sf_VMSHARE +# $./run.build.sh release 5.12.5 /media/sf_VMSHARE #setup Qt dir version if [[ "$2" = "" ]]; then QT_VER="" @@ -71,6 +71,9 @@ if [[ -e $out_path ]]; then rm -frd $out_path fi +echo " ------------------------------ create the build folder" +mkdir $out_path + if [[ -e $pro_path ]]; then rm -frd $pro_path fi @@ -81,31 +84,20 @@ echo " ------------------------------ clone the application repository" git clone ssh://git@dvm-linux02:7999/ui/application.git +cd application +echo " ------------------------------ run the cppcheck" +./cppcheck.sh ../$out_path/ +cd .. echo " ------------------------------ set the build type (debug/release)" buildType "$1" - -echo " ------------------------------ create the build folder" -mkdir $out_path cd $out_path -echo " ------------------------------ run the cppcheck" +echo " ------------------------------ run the cppcheck diff" app_path=../$pro_path -cppcheck $app_path -v \ - -I$app_path/sources \ - -I$app_path/sources/gui \ - -I$app_path/sources/storage \ - -I$app_path/sources/configuration \ - -I$app_path/sources/canbus \ - --enable=all \ - 1> cppcheck.log \ - 2> cppcheck.err +diff $app_path/cppcheck.log cppcheck.log 1> cppcheck.logdiff.log 2> cppcheck.logdiff.err +diff $app_path/cppcheck.err cppcheck.err 1> cppcheck.errdiff.log 2> cppcheck.errdiff.err -if [[ $(grep \(error\) cppcheck.err) != "" ]]; then - echo "ERROR: Static Code Analysis Failed" - exit 1 -fi - # ============================================================= echo " ------------------------------ Start building [$gcc_out]" mkdir -p $gcc_out