Index: build/build.sh =================================================================== diff -u -r5c7330eb9f6d4f063e016f9d558b923bbff1182e -r0188856aab5c6f035ee542a380a62631d168ec01 --- build/build.sh (.../build.sh) (revision 5c7330eb9f6d4f063e016f9d558b923bbff1182e) +++ build/build.sh (.../build.sh) (revision 0188856aab5c6f035ee542a380a62631d168ec01) @@ -65,6 +65,9 @@ poky_out=$poky_out_base"_"$pro_type poky_spec="-spec devices/linux-oe-generic-g++" +# Test pass/fail flag +hasTestPassed=true + #build type detection and set function (debug/release) function buildType() { echo @@ -191,17 +194,24 @@ cd application echo " ------------------------------ run the cppcheck" cppCheckStatus=$(runCppcheck $(pwd) $REMOTE_DIR $STATUS_REPORT) -#./cppcheck.sh ../$out_path/ +if [[ $cppCheckStatus -eq 1 ]] +then + hasTestPassed=false +fi + +#./cppcheck.sh ../$out_path/ #TODO remove cd .. echo " ------------------------------ set the build type (debug/release)" buildType "$1" cd $out_path +# TODO remove #echo " ------------------------------ run the cppcheck diff" #app_path=../$pro_path #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 +# TODO remove # ============================================================= echo " ------------------------------ Start building [$gcc_out]" @@ -219,6 +229,7 @@ if [[ $(grep "error:" $build_err) != "" ]]; then echo "ERROR: Application Build Failed [$gcc_out]" echo "Build, Failed, $gcc_out" >> $STATUS_REPORT + hasTestPassed=false exit 2 else echo "Build, Passed" >> $STATUS_REPORT @@ -307,7 +318,11 @@ # Generate code review project getCodeReviewReport "UI" $REMOTE_DIR +# Mark pass/fail to the build folder +markRemoteFolderWithPassFail $hasTestPassed $REMOTE_DIR + +