Index: build/unittest.sh =================================================================== diff -u -r2667698770cf154c6448a3d2eec0fe5bfd261e56 -r132bce6618c8c631a2283443c7b6063e8cb3837d --- build/unittest.sh (.../unittest.sh) (revision 2667698770cf154c6448a3d2eec0fe5bfd261e56) +++ build/unittest.sh (.../unittest.sh) (revision 132bce6618c8c631a2283443c7b6063e8cb3837d) @@ -15,8 +15,19 @@ done < "$input" } +function getSupportFunctions() +{ + if [[ ! -d "supportscript" ]] + then + git clone ssh://git@dvm-linux02:7999/bl/supportscript.git + fi + source ./supportscript/supportscript.sh +} + function setup_Script_Environment() { + getSupportFunctions + # --- keep Test Folder folder PWD=$(pwd) WORKING_DIR=$PWD @@ -58,8 +69,12 @@ SQUISH_DIR="/opt/squishqt" COCO_DIR="/opt/SquishCoco" - REMOTE_DIR="$SERVER_DIR/DEN_UI" - REPORT_DIR="$timeStamp-BuildNo-$buildNumber-$buildPlan" + #REMOTE_DIR="$SERVER_DIR/DEN_UI" + buildType=DVT + #REPORT_DIR="$timeStamp-BuildNo-$buildNumber-$buildPlan" + setBuildVariables $buildType $buildNumber + REPORT_DIR=$(getRemoteCopyAddress $timeStamp "DEN_UI") + echo $REPORT_DIR BUID_DIR=build BUILD_PATH=$WORKING_DIR/$BUID_DIR @@ -196,18 +211,21 @@ function check_TestResults() { - cd $REMOTE_DIR"/"$REPORT_DIR + #cd $REMOTE_DIR"/"$REPORT_DIR + cd $REPORT_DIR cd Coverage/index_html # In the index.html, get the Coverage section (exact pattern) # Parse everything that is from .*prg0 to the tag # In the parsed section, get everything from .*prg2"> to % and convert it to float values (i.e 42.76) - coveragePercent=$(cat index.html | awk '/\yCoverage\y/' | sed -e 's/.*prg0//' -e 's/<\/PRE>.*//' | sed -e 's/.*prg2">//' -e 's/%.*//' | grep -o -E '[0-9]+([.][0-9]+)') + coveragePercent=$(cat index.html | awk '/\yCoverage\y/' | sed -e 's/.*prg0//' -e 's/<\/PRE>.*//' | \ + sed -e 's/.*prg2">//' -e 's/%.*//' | grep -o -E '[0-9]+([.][0-9]+)') echo "Code Coverage is $coveragePercent%" - cd $REMOTE_DIR"/"$REPORT_DIR + #cd $REMOTE_DIR"/"$REPORT_DIR + cd $REPORT_DIR cd UnitTest @@ -283,8 +301,9 @@ function copy_TestsResults_IntoServer() { echo " ------------------------------ Copy the reports to server" - mkdir -p $REMOTE_DIR/$REPORT_DIR - cp -rd $REPORT_PATH/* $REMOTE_DIR/$REPORT_DIR + #mkdir -p $REMOTE_DIR/$REPORT_DIR + #cp -rd $REPORT_PATH/* $REMOTE_DIR/$REPORT_DIR + cp -rd $REPORT_PATH/* $REPORT_DIR sync;sync;sync; }