X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fpatch-coverage.pl;h=b3cf098aab1acc080b6e8bce3d5208915ba7b203;hp=702dc0bbd625c6bbb56ce4aea8448f9aaf2d1e5e;hb=7aacef8b9f8866b1b9806b2492c697bbdecd2336;hpb=ee37735fd7e7fbfd4782d66ec7fcf1c298bb19cf diff --git a/automated-tests/patch-coverage.pl b/automated-tests/patch-coverage.pl index 702dc0b..b3cf098 100755 --- a/automated-tests/patch-coverage.pl +++ b/automated-tests/patch-coverage.pl @@ -54,7 +54,7 @@ sub add_counts($$); sub info(@); our $repo = Git->repository(); -our $debug=1; +our $debug=0; our $pd_debug=0; our $root; our %info_data; # Hash containing all data from .info files @@ -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 ]; } # @@ -1316,7 +1316,7 @@ my $cwd = getcwd(); # expect this to be automated-tests folder # execute coverage.sh, generating build/tizen/dali.info from lib, and # *.dir/dali.info. Don't generate html -`coverage.sh -n`; +print `./coverage.sh -n`; chdir ".."; $root = getcwd(); @@ -1338,12 +1338,7 @@ foreach (@info_files) my @cmd=('--no-pager','diff','--no-ext-diff','-U0','--no-color'); my $status = $repo->command("status", "-s"); -if(scalar(@ARGV)) # REMOVE ME -{ - # REMOVE ME - temp to get past modifying this script in place. - push @cmd, @ARGV; -} -elsif( $status eq "" && !scalar(@ARGV)) +if( $status eq "" && !scalar(@ARGV)) { # There are no changes in the index or working tree, and # no diff arguments to append. Use the last patch instead. @@ -1422,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);