Index: build/build.sh =================================================================== diff -u -re14be295cb3a37e35e39c7bb4f043841d3321fb4 -r8f5e61e699354797f948e8778701d5df8609aac4 --- build/build.sh (.../build.sh) (revision e14be295cb3a37e35e39c7bb4f043841d3321fb4) +++ build/build.sh (.../build.sh) (revision 8f5e61e699354797f948e8778701d5df8609aac4) @@ -1,5 +1,20 @@ #!/bin/bash +# $./run.unittest.sh release 5.12.5 /media/sf_VMSHARE +#Setting up Display number +#setup Qt dir version +if [[ "$2" = "" ]]; then + QT_VER="" +else + QT_VER=$2 +fi +#Setting up server folder +if [[ "$3" = "" ]]; then + SERVER_DIR="/media/XDrive" +else + SERVER_DIR=$3 +fi + #setup environment device=root@192.168.10.135 # project pro file @@ -15,12 +30,12 @@ pro_build=$pro_release out_path="build" -REMOTE_DIR="/media/XDrive/Users/Bamboo-Projects" +REMOTE_DIR="$SERVER_DIR/Users/Bamboo-Projects" REPORT_DIR="$timeStamp-BuildNo-$buildNumber-$buildPlan" REPORT=Report # gcc env -gcc_qmake="/opt/Qt/5.12.4/gcc_64/bin/qmake" +gcc_qmake="/opt/Qt$QT_VER/5.12.4/gcc_64/bin/qmake" gcc_make="/usr/bin/make" gcc_out_base="gcc_64" gcc_out=$gcc_out_base"_"$pro_type @@ -41,9 +56,9 @@ pro_type=$pro_type_debug gcc_out=$gcc_out_base"_"$pro_type poky_out=$poky_out_base"_"$pro_type - echo "----- DEBUG BUILD ---------------------------" + echo " ------------------------------ DEBUG BUILD" else - echo "----- RELASE BUILD ---------------------------" + echo " ------------------------------ RELASE BUILD" fi echo } @@ -60,17 +75,17 @@ exit 0 fi -#clone the application repository +echo " ------------------------------ clone the application repository" git clone ssh://git@dvm-linux02:7999/ui/application.git -#set the build type (debug/release) +echo " ------------------------------ set the build type (debug/release)" buildType "$1" -#create the build folder +echo " ------------------------------ create the build folder" mkdir $out_path cd $out_path -# run the cppcheck +echo " ------------------------------ run the cppcheck" app_path=../$pro_path cppcheck $app_path -v \ -I$app_path/sources \ @@ -87,30 +102,15 @@ exit 1 fi -# disabled gcc_64 build for now -# since need to figure out how to install Qt without GUI on server -# #build for gcc -# echo "-----------------------------------------------" -# echo "- Start building ---------- gcc_64 ------------" -# echo "-----------------------------------------------" -# 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 -# cd .. -#build for poky -echo "-----------------------------------------------" -echo "- Start building ---------- poky_64 -----------" -echo "-----------------------------------------------" +echo " ------------------------------ Start building [poky_64]" mkdir -p $poky_out cd $poky_out -#run qmake +echo " ------------------------------ run qmake" $poky_qmake ../../$pro_path/$pro_name $poky_spec $pro_build -#run make +echo " ------------------------------ run make" build_err=../build.err build_log=../build.log $poky_make -j4 1> $build_log 2> $build_err @@ -125,11 +125,13 @@ #exit 3 fi -#copy built application into the specific target(s) +echo " ------------------------------ stop denali on device" ssh $device 'killall denali' sleep 1 +echo " ------------------------------ copy denali on device" scp ./denali $device://home/root/ sync;sync;sync; +echo " ------------------------------ start denali on device" ssh $device '~/denali &' #return back to out path @@ -138,9 +140,10 @@ #return back to main folder cd .. -#copy the out file into the server -mkdir -p $REMOTE_DIR/$REPORT_DIR/log -cp $out_path/* $REMOTE_DIR/$REPORT_DIR/log +echo " ------------------------------ copy the out file into the server" +LOG=Logs +mkdir -p $REMOTE_DIR/$REPORT_DIR/$LOG +cp $out_path/* $REMOTE_DIR/$REPORT_DIR/$LOG mkdir -p $REMOTE_DIR/$REPORT_DIR/bin cp $out_path/$poky_out/denali $REMOTE_DIR/$REPORT_DIR/bin sync;sync;sync;