Index: local/run.coco.sh =================================================================== diff -u -radacb0fc57fd0e03eaf98600feae4c8e55b9dcec -r5534b56f246b0597a37f08f145f4d61ae8340e4d --- local/run.coco.sh (.../run.coco.sh) (revision adacb0fc57fd0e03eaf98600feae4c8e55b9dcec) +++ local/run.coco.sh (.../run.coco.sh) (revision 5534b56f246b0597a37f08f145f4d61ae8340e4d) @@ -13,6 +13,10 @@ function cleanup() { rm -frd $WORKING_DIR + create_folders +} + +function create_folders() { mkdir -p $WORKING_DIR mkdir -p $REPORT_PATH mkdir -p $LOG_PATH @@ -58,12 +62,18 @@ } function coverageReport() { - echo " ------------------------------ Generating the coverage report" + REPORT_TYPE="html" + REPORT_CMD="--html=$REPORT_PATH/index" + if [[ "$1" == "csv" ]]; then + REPORT_TYPE="csv" + REPORT_CMD="--csv-excel=report_out.csv" + fi + echo " ------------------------------ Generating the coverage report <$REPORT_TYPE>" cmreport \ --csmes=$DENALI_SQUISH.csmes \ - --html=$REPORT_PATH/Coverage/index \ - 2> $LOG_PATH/cmreport.err \ - | tee $LOG_PATH/cmreport.log + $REPORT_CMD \ + 2> $LOG_PATH/cmreport.err \ + | tee $LOG_PATH/cmreport.log } function copy_TestsResults_IntoServer() { @@ -79,16 +89,18 @@ fi if [ "$1" = "--report" ]; then + create_folders cd $WORKING_DIR #coverageMerge # no need to merge since we only running one version of the application coverageImport - coverageReport + coverageReport "$2" fi if [ "$1" = "" ]; then echo "Usage:" echo "run.coco.sh " - echo "--build build and instrment the applicaiotn from $HOME/Projects/application" - echo "--report create the execution report of the ran applicaiton" + echo "--build build and instrment the applicaiotn from $HOME/Projects/application" + echo "--report create the execution report of the ran applicaiton" + echo " report type html:default, csv" fi