Index: build/build.sh =================================================================== diff -u -rb6ca0afad34e459b0700958b5f725d99f994a021 -r8fd222d29cda75ad0f7ea9ab7956deecb19473f1 --- build/build.sh (.../build.sh) (revision b6ca0afad34e459b0700958b5f725d99f994a021) +++ build/build.sh (.../build.sh) (revision 8fd222d29cda75ad0f7ea9ab7956deecb19473f1) @@ -18,17 +18,20 @@ REMOTE_DIR="/media/XDrive/Users/Bamboo-Projects" REPORT_DIR="$timeStamp-BuildNo-$buildNumber-$buildPlan" REPORT=Report +LOG=log # gcc env gcc_qmake="/opt/Qt/5.12.4/gcc_64/bin/qmake" gcc_make="/usr/bin/make" -gcc_out="gcc_64" +gcc_out_base="gcc_64" +gcc_out=$gcc_out_base"_"$pro_type gcc_spec="-spec linux-g++" # poky env poky_qmake="/opt/b2qt/2.5.3/sysroots/x86_64-pokysdk-linux/usr/bin/qmake" poky_make="/opt/b2qt/2.5.3/sysroots/x86_64-pokysdk-linux/usr/bin/make" -poky_out="poky_64" +poky_out_base="poky_64" +poky_out=$poky_out_base"_"$pro_type poky_spec="-spec devices/linux-oe-generic-g++" #build type detection and set function (debug/release) @@ -37,6 +40,8 @@ if [[ "$1" = "debug" ]]; then pro_build=$pro_debug pro_type=$pro_type_debug + gcc_out=$gcc_out_base"_"$pro_type + poky_out=$poky_out_base"_"$pro_type echo "----- DEBUG BUILD ---------------------------" else echo "----- RELASE BUILD ---------------------------" @@ -75,8 +80,8 @@ -I$app_path/sources/configuration \ -I$app_path/sources/canbus \ --enable=all \ - 1> cppcheck.log \ - 2> cppcheck.err + 1> $LOG/cppcheck.log \ + 2> $LOG/cppcheck.err if [[ $(grep \(error\) cppcheck.err) != "" ]]; then echo "ERROR: Static Code Analysis Failed" @@ -89,8 +94,8 @@ # echo "-----------------------------------------------" # echo "- Start building ---------- gcc_64 ------------" # echo "-----------------------------------------------" -# mkdir -p $gcc_out"_"$pro_type -# cd $gcc_out"_"$pro_type +# mkdir -p $gcc_out +# cd $gcc_out # $gcc_qmake ../../$pro_path/$pro_name $gcc_spec $pro_build # $gcc_make -j4 # #return back to out path @@ -100,15 +105,15 @@ echo "-----------------------------------------------" echo "- Start building ---------- poky_64 -----------" echo "-----------------------------------------------" -mkdir -p $poky_out"_"$pro_type -cd $poky_out"_"$pro_type +mkdir -p $poky_out +cd $poky_out #run qmake $poky_qmake ../../$pro_path/$pro_name $poky_spec $pro_build #run make -build_err=../build.err -build_log=../build.log +build_err=../$LOG/build.err +build_log=../$LOG/build.log $poky_make -j4 1> $build_log 2> $build_err if [[ $(grep "error:" $build_err) != "" ]]; then @@ -123,16 +128,21 @@ #copy built application into the specific target(s) ssh $device 'killall denali' -scp ./denali $device://home/root/;sync;sync;sync; -ssh $device './denali &' +sleep 1 +scp ./denali $device://home/root/ +sync;sync;sync; +ssh $device '~/denali &' #return back to out path - cd .. #return back to main folder cd .. #copy the out file into the server -cp $out_path/* $REMOTE_DIR/$REPORT_DIR;sync;sync;sync; +cp $out_path/$LOG/* $REMOTE_DIR/$REPORT_DIR +mkdir -p $REMOTE_DIR/$REPORT_DIR/bin +cp $out_path/$poky_out/denali $REMOTE_DIR/$REPORT_DIR/bin +sync;sync;sync; + Index: build/unittest.sh =================================================================== diff -u -rb6ca0afad34e459b0700958b5f725d99f994a021 -r8fd222d29cda75ad0f7ea9ab7956deecb19473f1 --- build/unittest.sh (.../unittest.sh) (revision b6ca0afad34e459b0700958b5f725d99f994a021) +++ build/unittest.sh (.../unittest.sh) (revision 8fd222d29cda75ad0f7ea9ab7956deecb19473f1) @@ -8,6 +8,7 @@ REMOTE_DIR="/media/XDrive/Users/Bamboo-Projects" REPORT_DIR="$timeStamp-BuildNo-$buildNumber-$buildPlan" REPORT=Report +LOGS=logs export PATH=$PATH:/opt/Qt5.12.5/5.12.5/gcc_64/bin/:/opt/Qt/5.12.5/gcc_64/lib export PATH=$PATH:/opt/SquishCoco/bin/:/opt/SquishCoco/wrapper/bin/ @@ -34,17 +35,17 @@ git clone ssh://git@dvm-linux02:7999/ui/testsuites.git echo " ------------------------------ Starting the Squish Server" -$SQUISH_DIR/bin/squishserver addAUT $BUID_DIR/denali --port=$SQUISH_SERVER_PORT 1>$REPORT/server.log 2>$REPORT/server.err & +$SQUISH_DIR/bin/squishserver addAUT $BUID_DIR/denali --port=$SQUISH_SERVER_PORT 1>$REPORT/$LOGS/server.log 2>$REPORT/$LOGS/server.err & echo " ------------------------------ Starting tests" $SQUISH_DIR/bin/squishrunner addAUT $BUID_DIR/denali --testsuite testsuites --exitCodeOnFail 13 --reportgen html,$REPORT/UnitTest sleep 5 echo " ------------------------------ Importing the excecution report into the coverage database" -cmcsexeimport -m $BUID_DIR/denali.csmes -t UnitTest01 $BUID_DIR/denali.csexe 1>$REPORT/cmcsexeimport.log 2>$REPORT/cmcsexeimport.err +cmcsexeimport -m $BUID_DIR/denali.csmes -t UnitTest01 $BUID_DIR/denali.csexe 1>$REPORT/$LOGS/cmcsexeimport.log 2>$REPORT/$LOGS/cmcsexeimport.err echo " ------------------------------ Generating the coverage report" -cmreport --csmes=$BUID_DIR/denali.csmes --html=$REPORT/Coverage/index 1>$REPORT/cmreport.log 2>$REPORT/cmreport.err +cmreport --csmes=$BUID_DIR/denali.csmes --html=$REPORT/Coverage/index 1>$REPORT/$LOGS/cmreport.log 2>$REPORT/$LOGS/cmreport.err echo " ------------------------------ Copy the reports to server" mkdir $REMOTE_DIR/$REPORT_DIR