Index: build/unittest.sh =================================================================== diff -u -r99a429cb5e624941c64e742a2fe95074730c4719 -r79242b53a1eae3b2413b657dac2e2f028c3db327 --- build/unittest.sh (.../unittest.sh) (revision 99a429cb5e624941c64e742a2fe95074730c4719) +++ build/unittest.sh (.../unittest.sh) (revision 79242b53a1eae3b2413b657dac2e2f028c3db327) @@ -1,6 +1,6 @@ #!/bin/bash -echo "--------------------------- Definisions" +echo " ------------------------------ Definisions " SQUISH_SERVER_PORT=4322 BUID_DIR=build QT_DIR="/opt/Qt/5.12.5/gcc_64/bin" @@ -9,46 +9,45 @@ REPORT_DIR="$timeStamp-BuildNo-$buildNumber-$buildPlan" REPORT=Report -export PATH=$PATH:/opt/SquishCoco/bin:/opt/SquishCoco/wrapper/bin +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/ +export LD_LIBRARY_PATH=/opt/Qt/5.12.5/gcc_64/lib export DISPLAY=:10.0 +echo " ------------------------------ Create the Report output/log folder" mkdir $REPORT -echo "--------------------------- clone denali" +echo " ------------------------------ Clone Denali " git clone ssh://git@dvm-linux02:7999/ui/application.git -echo "--------------------------- Build Application" +echo " ------------------------------ Build Application " mkdir $BUID_DIR cd $BUID_DIR -echo "--------------------------- configure the project" +echo " ------------------------------ Configure The Project for Coverage" # Coco Build - Instrumentation /opt/Qt/5.12.5/gcc_64/bin/qmake ../application/denali.pro -spec linux-g++ CONFIG+=qtquickcompiler CONFIG+=CodeCoverage /usr/bin/make LINK=csg++ AR=csar CXX=csg++ CC=csgcc -j4 cd .. -echo "--------------------------- Clone the Test Suite" -echo "Clone Test Suites..." +echo " ------------------------------ Clone the Test Suites" git clone ssh://git@dvm-linux02:7999/ui/testsuites.git -echo "--------------------------- Run the Squish runner" -echo "Starting tests..." -$SQUISH_DIR/bin/squishrunner addAUT $BUID_DIR/denali --testsuite testsuites --local --exitCodeOnFail 13 --reportgen html,$REPORT/UnitTest 1>$REPORT/runner.log 2>$REPORT/runner.err +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 & -echo "--------------------------- Run the denali application as a test, since the Squish Qt can't run it right now." -cd $BUID_DIR -./denali & -sleep 5 -killall denali -sleep 5 -cd .. +echo " ------------------------------ Starting tests" +$SQUISH_DIR/bin/squishrunner addAUT $BUID_DIR/denali --testsuite testsuites --exitCodeOnFail 13 --reportgen html,$REPORT/UnitTest -echo "--------------------------- Importing the excecution report into the coverage database" -cmcsexeimport -m $PWD/$BUID_DIR/denali.csmes -t UnitTest01 $PWD/$BUID_DIR/denali.csexe -echo "--------------------------- Generating the coverage report" +echo " ------------------------------ Importing the excecution report into the coverage database" +cmcsexeimport -m $BUID_DIR/denali.csmes -t UnitTest01 $BUID_DIR/denali.csexe + +echo "------------------------------ Generating the coverage report" cmreport --csmes=$PWD/$BUID_DIR/denali.csmes --html=$REPORT/Coverage/index -echo "--------------------------- Copy the reports" +echo " ------------------------------ Copy the reports to server" mkdir $REMOTE_DIR/$REPORT_DIR cp -rd Report/* $REMOTE_DIR/$REPORT_DIR +echo " ------------------------------ Stoping the Squish Server" +$SQUISH_DIR/bin/squishserver --port=$SQUISH_SERVER_PORT --stop