Index: local/run.coco.sh =================================================================== diff -u -r5534b56f246b0597a37f08f145f4d61ae8340e4d -r69e2206766124aed71e9cba9792aa256c223ecda --- local/run.coco.sh (.../run.coco.sh) (revision 5534b56f246b0597a37f08f145f4d61ae8340e4d) +++ local/run.coco.sh (.../run.coco.sh) (revision 69e2206766124aed71e9cba9792aa256c223ecda) @@ -23,7 +23,7 @@ } function build_with_coverage() { - echo " ------------------------------ Run qmake" + echo "Run qmake" echo $(pwd) $QT_DIR/qmake \ $APPLICATION/denali.pro \ @@ -33,17 +33,17 @@ CONFIG+=CodeCoverage \ TARGET="$1" - echo " ------------------------------ Run make" + echo "Run make" /usr/bin/make \ LINK=csg++ AR=csar CXX=csg++ CC=csgcc -j4 \ 2> $LOG_PATH/build_for_"$1".err \ | tee $LOG_PATH/build_for_"$1".log && /usr/bin/make clean - echo " ------------------------------ Cleaned for next build" + echo "Cleaned for next build" } function coverageMerge() { - echo " ------------------------------ Merging the excecution report databases" + echo "Merging the excecution report databases" cmmerge \ -o denali.csmes \ $DENALI_SQUISH.csmes \ @@ -52,7 +52,7 @@ } function coverageImport() { - echo " ------------------------------ Importing the execution report into the coverage database" + echo "Importing the execution report into the coverage database" cmcsexeimport \ -m $DENALI_SQUISH.csmes \ -t Squish \ @@ -66,18 +66,21 @@ REPORT_CMD="--html=$REPORT_PATH/index" if [[ "$1" == "csv" ]]; then REPORT_TYPE="csv" - REPORT_CMD="--csv-excel=report_out.csv" + REPORT_FILE=report_out.csv + REPORT_CMD="--csv-excel=$REPORT_FILE" fi - echo " ------------------------------ Generating the coverage report <$REPORT_TYPE>" + echo "Generating the coverage report <$REPORT_TYPE>" cmreport \ --csmes=$DENALI_SQUISH.csmes \ $REPORT_CMD \ 2> $LOG_PATH/cmreport.err \ | tee $LOG_PATH/cmreport.log + mv report_out.csv Report/ + echo "Out file location : $(pwd)/Report/$REPORT_FILE" } function copy_TestsResults_IntoServer() { - echo " ------------------------------ Copy the reports to server" + echo "Copy the reports to server" cp -rd $REPORT_PATH/* $REPORT_DIR sync;sync;sync; } Index: local/run.qml_eloc.sh =================================================================== diff -u --- local/run.qml_eloc.sh (revision 0) +++ local/run.qml_eloc.sh (revision 69e2206766124aed71e9cba9792aa256c223ecda) @@ -0,0 +1,26 @@ +#!/bin/bash + +SEP="," +echo "$1" $SEP "eLOC" $SEP "Description" $SEP "Path" + +function qml_eloc { + eLOC=$(qmlmin "$1" | sed -e 's/;/\n/g;s/}/\n}\n/g;s/\n\n/\n/g;s/\n\n\n/\n/g' | wc -l) + echo "$eLOC" +} + +if [[ -n "$1" && -f "./$1" ]]; then + echo "$1:" $(qml_eloc "$1") + exit 0 +fi + +if [[ -n "$1" && -d "./$1" ]]; then + QML_FILES=($(find "./$1" -name *.qml | sort)) + for qml_file in "${QML_FILES[@]}"; do +# echo "$( basename $qml_file)" " : " $(qml_eloc "$qml_file") " : " "$( dirname $qml_file)" + echo $(basename "$qml_file") $SEP $(qml_eloc "$qml_file") $SEP $SEP $(dirname "$qml_file") + done + exit 0 +fi + +echo "Please give the qml file name or qml files location" +exit 1