Merge "refactor Dictionary class." into devel/master
authorDavid Steele <david.steele@samsung.com>
Tue, 10 Nov 2020 12:01:27 +0000 (12:01 +0000)
committerGerrit Code Review <gerrit@review>
Tue, 10 Nov 2020 12:01:27 +0000 (12:01 +0000)
automated-tests/patch-coverage.pl
automated-tests/scripts/retriever.sh
automated-tests/scripts/tctestsgen.sh

index 3a97dac..b3cf098 100755 (executable)
@@ -1105,7 +1105,7 @@ sub calc_patch_coverage_percentage
     my $percent = 0;
     if($total_exec > 0) { $percent = 100 * $total_covered_lines / $total_exec; }
 
-    return [ $total_exec, $percent ];
+    return [ $total_exec, $percent, $total_covered_lines ];
 }
 
 #
@@ -1417,6 +1417,7 @@ elsif( ! $opt_quiet )
     print RESET;
 }
 
+printf("Line Coverage: %d/%d\n", $percentref->[2], $percentref->[0]);
 printf("Percentage of change covered: %5.2f%\n", $percent);
 
 exit($percent<90);
index 248481e..102bb44 100755 (executable)
@@ -165,8 +165,8 @@ function tc_fullinfo {
     ' $*
 }
 
-TEMP=`getopt -o f,a:,m: --long full,anum:,mnum: \
-     -n 'genmake' -- "$@"`
+TEMP=`getopt -o f::,a:,m: --long full::,anum:,mnum: \
+     -n 'retriever.sh' -- "$@"`
 
 if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
 
@@ -174,12 +174,13 @@ if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
 eval set -- "$TEMP"
 
 opt_full=false
+opt_full_dir=
 opt_anum=
 opt_mnum=
 
 while true ; do
     case "$1" in
-        -f|--full) opt_full=true ; shift ;;
+        -f|--full) opt_full_dir="$2" ; opt_full="true" ; shift 2 ;;
         -a|--anum) opt_anum="$2" ; shift 2 ;;
         -m|--mnum) opt_mnum="$2" ; shift 2 ;;
         --) shift ; break ;;
@@ -187,6 +188,10 @@ while true ; do
     esac
 done
 
+#echo "###Retriever" >& 2
+#echo opt_full: {$opt_full} >& 2
+#echo opt_full_dir: {$opt_full_dir} >& 2
+
 DIR=.
 if [ -n "$opt_anum" ] ; then
     DIR=$opt_anum
@@ -194,8 +199,14 @@ if [ -n "$opt_anum" ] ; then
 elif [ -n "$opt_mnum" ] ; then
     DIR=$opt_mnum
     echo opt_mnum: DIR=$DIR >& 2
+elif [ "$opt_full" == "true" ] ; then
+    if [ -n $opt_full_dir ] ; then
+        DIR=$opt_full_dir
+        echo opt_full: DIR=$DIR >& 2
+    fi
 fi
 
+
 # get filename from first argument
 if [[ $# == 1 && -f $DIR/$1 ]] ; then
     FILE=$1
@@ -229,7 +240,7 @@ fi
 
 
 # run appropriate subcommand
-if [ $opt_full == "true" ] ; then
+if [ "$opt_full" == "true" ] ; then
     tc_fullinfo $TC_FILES
 elif [ -n "$opt_anum" ] ; then
     tc_anum $TC_FILES
index 1881668..517cfb4 100755 (executable)
@@ -60,7 +60,9 @@ print "</test_definition>"
     }' $TFILE > $FILE
 }
 
-(cd $SCRIPT_DIR/..; scripts/retriever.sh -f src/$MODULE_NAME $4 > ${TFILE}_pre)
+cmd="cd $SCRIPT_DIR/..; scripts/retriever.sh -fsrc/$MODULE_NAME $4 > ${TFILE}_pre"
+echo "$cmd"
+( eval $cmd )
 if [ $? -ne 0 ]; then cat ${TFILE}_pre; exit 1; fi
 cat ${TFILE}_pre | sort -t',' -k2,2 -s > $TFILE
 gen