Index: build/build.sh =================================================================== diff -u -rba8f705b0702f0da1a78c96c861c9681898824d2 -rde456b79b8f799dfcfdf0c0c2cbaf95869d59dc4 --- build/build.sh (.../build.sh) (revision ba8f705b0702f0da1a78c96c861c9681898824d2) +++ build/build.sh (.../build.sh) (revision de456b79b8f799dfcfdf0c0c2cbaf95869d59dc4) @@ -202,112 +202,115 @@ #./cppcheck.sh ../$out_path/ #TODO remove cd .. -echo " ------------------------------ set the build type (debug/release)" -buildType "$1" -cd $out_path +# Open up the status report and parse for the word Faild. This is +# for the unit test and integration tests that are executed at another +# script. The results will be used to mark the build folder as passed or failed +# NOTE: find for Failed before adding the manual cases since there might be a +# function containing the name Failed in it +failedCases=$(cat $STATUS_REPORT | grep "Failed") +if [[ ! -z $failedCases ]] +then + hasTestPassed=false +fi -# 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 +if [[ $hasTestPassed == true ]] +then + echo " ------------------------------ set the build type (debug/release)" + buildType "$1" + cd $out_path -# ============================================================= -echo " ------------------------------ Start building [$gcc_out]" -mkdir -p $gcc_out -cd $gcc_out + # 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 " ------------------------------ run qmake" -$gcc_qmake ../../$pro_path/$pro_name $gcc_spec $pro_build + # ============================================================= + echo " ------------------------------ Start building [$gcc_out]" + mkdir -p $gcc_out + cd $gcc_out -echo " ------------------------------ run make" -build_err=../build_$gcc_out.err -build_log=../build_$gcc_out.log -$gcc_make -j4 1> $build_log 2> $build_err + echo " ------------------------------ run qmake" + $gcc_qmake ../../$pro_path/$pro_name $gcc_spec $pro_build -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 -fi + echo " ------------------------------ run make" + build_err=../build_$gcc_out.err + build_log=../build_$gcc_out.log + $gcc_make -j4 1> $build_log 2> $build_err -if [[ $(grep "warning:" $build_err) != "" ]]; then - echo "WARNING: Application Build Has Warnings [$gcc_out]" - echo "Application build warnings:, $gcc_out" >> $STATUS_REPORT - #exit 3 -fi -echo "" >> $STATUS_REPORT -cd .. + 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 + fi -# ============================================================= -echo " ------------------------------ Start building [$poky_out]" -mkdir -p $poky_out -cd $poky_out + if [[ $(grep "warning:" $build_err) != "" ]]; then + echo "WARNING: Application Build Has Warnings [$gcc_out]" + echo "Application build warnings:, $gcc_out" >> $STATUS_REPORT + #exit 3 + fi + echo "" >> $STATUS_REPORT + cd .. -echo " ------------------------------ run qmake" -$poky_qmake ../../$pro_path/$pro_name $poky_spec $pro_build + # ============================================================= + echo " ------------------------------ Start building [$poky_out]" + mkdir -p $poky_out + cd $poky_out -echo " ------------------------------ run make" -build_err=../build_$poky_out.err -build_log=../build_$poky_out.log -$poky_make -j4 1> $build_log 2> $build_err + echo " ------------------------------ run qmake" + $poky_qmake ../../$pro_path/$pro_name $poky_spec $pro_build -if [[ $(grep "error:" $build_err) != "" ]]; then - echo "ERROR: Application Build Failed [$poky_out]" - exit 2 -fi + echo " ------------------------------ run make" + build_err=../build_$poky_out.err + build_log=../build_$poky_out.log + $poky_make -j4 1> $build_log 2> $build_err -if [[ $(grep "warning:" $build_err) != "" ]]; then - echo "WARNING: Application Build Has Warnings [$poky_out]" - #exit 3 -fi + if [[ $(grep "error:" $build_err) != "" ]]; then + echo "ERROR: Application Build Failed [$poky_out]" + exit 2 + fi -# ============================================================= -echo " ------------------------------ stop denali on device [$DEVICE_IP]" -ssh $device 'killall denali' -sleep 1 -echo " ------------------------------ copy denali on device [$DEVICE_IP]" -scp ./denali $device://home/root/ -sync;sync;sync; -sleep 1 -echo " ------------------------------ start denali on device[$DEVICE_IP]" -ssh -f $device '/home/root/denali' 1>/dev/null 2>/dev/null + if [[ $(grep "warning:" $build_err) != "" ]]; then + echo "WARNING: Application Build Has Warnings [$poky_out]" + #exit 3 + fi -#return back to out path -cd .. + # ============================================================= + echo " ------------------------------ stop denali on device [$DEVICE_IP]" + ssh $device 'killall denali' + sleep 1 + echo " ------------------------------ copy denali on device [$DEVICE_IP]" + scp ./denali $device://home/root/ + sync;sync;sync; + sleep 1 + echo " ------------------------------ start denali on device[$DEVICE_IP]" + ssh -f $device '/home/root/denali' 1>/dev/null 2>/dev/null -#return back to main folder -cd .. + #return back to out path + cd .. -echo " ------------------------------ copy the out file into the server" -LOG=Logs -echo " ------------------------------ $poky_out" -mkdir -p $REMOTE_DIR/$REPORT_DIR/$LOG -cp $out_path/* $REMOTE_DIR/$REPORT_DIR/$LOG -mkdir -p $REMOTE_DIR/$REPORT_DIR/bin/$poky_out -cp $out_path/$poky_out/denali $REMOTE_DIR/$REPORT_DIR/bin/$poky_out -sync;sync;sync; + #return back to main folder + cd .. -echo " ------------------------------ $gcc_out" -mkdir -p $REMOTE_DIR/$REPORT_DIR/$LOG -cp $out_path/* $REMOTE_DIR/$REPORT_DIR/$LOG -mkdir -p $REMOTE_DIR/$REPORT_DIR/bin/$gcc_out -cp $out_path/$gcc_out/denali $REMOTE_DIR/$REPORT_DIR/bin/$gcc_out -sync;sync;sync; + echo " ------------------------------ copy the out file into the server" + LOG=Logs + echo " ------------------------------ $poky_out" + mkdir -p $REMOTE_DIR/$REPORT_DIR/$LOG + cp $out_path/* $REMOTE_DIR/$REPORT_DIR/$LOG + mkdir -p $REMOTE_DIR/$REPORT_DIR/bin/$poky_out + cp $out_path/$poky_out/denali $REMOTE_DIR/$REPORT_DIR/bin/$poky_out + sync;sync;sync; -# Open up the statu report and parse for the word Faild. This is -# for the unit test and integration tests that are executed at another -# script. The results will be used to mark the build folder as passed or failed -# NOTE: find for Failed before adding the manual cases since there might be a -# function containing the name Failed in it -failedCases=$(cat $STATUS_REPORT/StatusReport.csv | grep "Failed") -if [[ ! -z $failedCases ]] -then - hasTestPassed=false + echo " ------------------------------ $gcc_out" + mkdir -p $REMOTE_DIR/$REPORT_DIR/$LOG + cp $out_path/* $REMOTE_DIR/$REPORT_DIR/$LOG + mkdir -p $REMOTE_DIR/$REPORT_DIR/bin/$gcc_out + cp $out_path/$gcc_out/denali $REMOTE_DIR/$REPORT_DIR/bin/$gcc_out + sync;sync;sync; fi getManualCases