From: Peter O. <obe...@us...> - 2007-07-02 15:29:07
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv22050/bin Modified Files: geninfo lcov Log Message: lcov: preparations for new release - updated CHANGES file - added compat-libtool + no-compat-libtool option - changed libtool default to on (due to popular request) - added checksum option - changed checksum default to off (to reduce cpu time + file size) - added geninfo_checksum option to lcovrc, deprecated geninfo_no_checksum - added geninfo_compat_libtool option to lcovrc - minor update of README file Index: geninfo =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/geninfo,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** geninfo 7 Mar 2007 14:59:25 -0000 1.28 --- geninfo 2 Jul 2007 15:29:02 -0000 1.29 *************** *** 1,5 **** #!/usr/bin/perl -w # ! # Copyright (c) International Business Machines Corp., 2002 # # This program is free software; you can redistribute it and/or modify --- 1,5 ---- #!/usr/bin/perl -w # ! # Copyright (c) International Business Machines Corp., 2002,2007 # # This program is free software; you can redistribute it and/or modify *************** *** 106,112 **** our $version; our $follow; ! our $nochecksum; our $preserve_paths; our $compat_libtool; our $adjust_testname; our $config; # Configuration file contents --- 106,114 ---- our $version; our $follow; ! our $checksum; ! our $no_checksum; our $preserve_paths; our $compat_libtool; + our $no_compat_libtool; our $adjust_testname; our $config; # Configuration file contents *************** *** 143,147 **** "geninfo_gcov_tool" => \$gcov_tool, "geninfo_adjust_testname" => \$adjust_testname, ! "geninfo_no_checksum" => \$nochecksum}); } --- 145,158 ---- "geninfo_gcov_tool" => \$gcov_tool, "geninfo_adjust_testname" => \$adjust_testname, ! "geninfo_checksum" => \$checksum, ! "geninfo_no_checksum" => \$no_checksum, # deprecated ! "geninfo_compat_libtool" => \$compat_libtool}); ! ! # Merge options ! if (defined($no_checksum)) ! { ! $checksum = ($no_checksum ? 0 : 1); ! $no_checksum = undef; ! } } *************** *** 149,153 **** if (!GetOptions("test-name=s" => \$test_name, "output-filename=s" => \$output_filename, ! "no-checksum" => \$nochecksum, "base-directory=s" => \$base_directory, "version" =>\$version, --- 160,165 ---- if (!GetOptions("test-name=s" => \$test_name, "output-filename=s" => \$output_filename, ! "checksum" => \$checksum, ! "no-checksum" => \$no_checksum, "base-directory=s" => \$base_directory, "version" =>\$version, *************** *** 156,159 **** --- 168,172 ---- "follow" => \$follow, "compat-libtool" => \$compat_libtool, + "no-compat-libtool" => \$no_compat_libtool, "gcov-tool=s" => \$gcov_tool, "ignore-errors=s" => \@ignore_errors *************** *** 163,166 **** --- 176,194 ---- exit(1); } + else + { + # Merge options + if (defined($no_checksum)) + { + $checksum = ($no_checksum ? 0 : 1); + $no_checksum = undef; + } + + if (defined($no_compat_libtool)) + { + $compat_libtool = ($no_compat_libtool ? 0 : 1); + $no_compat_libtool = undef; + } + } @data_directory = @ARGV; *************** *** 209,212 **** --- 237,263 ---- } + # Determine checksum mode + if (defined($checksum)) + { + # Normalize to boolean + $checksum = ($checksum ? 1 : 0); + } + else + { + # Default is off + $checksum = 0; + } + + # Determine libtool compatibility mode + if (defined($compat_libtool)) + { + $compat_libtool = ($compat_libtool? 1 : 0); + } + else + { + # Default is on + $compat_libtool = 1; + } + # Check for directory name if (!@data_directory) *************** *** 338,344 **** -o, --output-filename OUTFILE Write data only to OUTFILE -f, --follow Follow links when searching .da/.gcda files - -n, --no-checksum Do not calculate checksum for each line -b, --base-directory DIR Use DIR as base directory for relative paths ! --compat-libtool Assume libtool environment --gcov-tool TOOL Specify gcov tool location --ignore-errors ERROR Continue after ERROR (gcov, source) --- 389,395 ---- -o, --output-filename OUTFILE Write data only to OUTFILE -f, --follow Follow links when searching .da/.gcda files -b, --base-directory DIR Use DIR as base directory for relative paths ! --(no-)checksum Enable (disable) line checksumming ! --(no-)compat-libtool Enable (disable) libtool compatibility mode --gcov-tool TOOL Specify gcov tool location --ignore-errors ERROR Continue after ERROR (gcov, source) *************** *** 645,649 **** # available - this interfers with checksum creation so we need # to pull the emergency brake here. ! if (defined($source) && ! -r $source && ! $nochecksum) { if ($ignore[$ERROR_SOURCE]) --- 696,700 ---- # available - this interfers with checksum creation so we need # to pull the emergency brake here. ! if (defined($source) && ! -r $source && $checksum) { if ($ignore[$ERROR_SOURCE]) *************** *** 738,743 **** $lines_found++; printf(INFO_HANDLE "DA:".$line_number.",". ! $gcov_content[1].($nochecksum ? "" : ! ",". md5_base64($gcov_content[2])). "\n"); --- 789,794 ---- $lines_found++; printf(INFO_HANDLE "DA:".$line_number.",". ! $gcov_content[1].($checksum ? ! ",". md5_base64($gcov_content[2]) : ""). "\n"); Index: lcov =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/lcov,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** lcov 22 May 2007 08:11:44 -0000 1.19 --- lcov 2 Jul 2007 15:29:02 -0000 1.20 *************** *** 1,5 **** #!/usr/bin/perl -w # ! # Copyright (c) International Business Machines Corp., 2002 # # This program is free software; you can redistribute it and/or modify --- 1,5 ---- #!/usr/bin/perl -w # ! # Copyright (c) International Business Machines Corp., 2002,2007 # # This program is free software; you can redistribute it and/or modify *************** *** 138,142 **** our $help; # Help option flag our $version; # Version option flag - our $nochecksum =""; # If set, don't calculate a checksum for each line our $convert_filenames; # If set, convert filenames when applying diff our $strip; # If set, strip leading directories when applying diff --- 138,141 ---- *************** *** 148,152 **** our $diff_path = ""; # Path removed from tracefile when applying diff our $base_directory; # Base directory (cwd of gcc during compilation) ! our $compat_libtool; # Specify to work with libtool build environment our $gcov_tool; our $ignore_errors; --- 147,154 ---- our $diff_path = ""; # Path removed from tracefile when applying diff our $base_directory; # Base directory (cwd of gcc during compilation) ! our $checksum; # If set, calculate a checksum for each line ! our $no_checksum; # If set, don't calculate a checksum for each line ! our $compat_libtool; # If set, indicates that libtool mode is to be enabled ! our $no_compat_libtool; # If set, indicates that libtool mode is to be disabled our $gcov_tool; our $ignore_errors; *************** *** 195,199 **** "remove=s" => \$remove, "diff=s" => \$diff, - "no-checksum" => \$nochecksum, "convert-filenames" => \$convert_filenames, "strip=i" => \$strip, --- 197,200 ---- *************** *** 208,212 **** --- 209,216 ---- "path=s" => \$diff_path, "base-directory=s" => \$base_directory, + "checksum" => \$checksum, + "no-checksum" => \$no_checksum, "compat-libtool" => \$compat_libtool, + "no-compat-libtool" => \$no_compat_libtool, "gcov-tool=s" => \$gcov_tool, "ignore-errors=s" => \$ignore_errors *************** *** 216,219 **** --- 220,238 ---- exit(1); } + else + { + # Merge options + if (defined($no_checksum)) + { + $checksum = ($no_checksum ? 0 : 1); + $no_checksum = undef; + } + + if (defined($no_compat_libtool)) + { + $compat_libtool = ($no_compat_libtool ? 0 : 1); + $no_compat_libtool = undef; + } + } # Check for help option *************** *** 354,362 **** -k, --kernel-directory KDIR Capture kernel coverage data only from KDIR -b, --base-directory DIR Use DIR as base directory for relative paths - --no-checksum Do not calculate a checksum for each line --convert-filenames Convert filenames when applying diff --strip DEPTH Strip initial DEPTH directory levels in diff --path PATH Strip PATH from tracefile when applying diff ! --compat-libtool Assume libtool environment --gcov-tool TOOL Specify gcov tool location --ignore-errors ERROR Continue after ERROR (gcov, source) --- 373,381 ---- -k, --kernel-directory KDIR Capture kernel coverage data only from KDIR -b, --base-directory DIR Use DIR as base directory for relative paths --convert-filenames Convert filenames when applying diff --strip DEPTH Strip initial DEPTH directory levels in diff --path PATH Strip PATH from tracefile when applying diff ! --(no-)checksum Enable (disable) line checksumming ! --(no-)compat-libtool Enable (disable) libtool compatibility mode --gcov-tool TOOL Specify gcov tool location --ignore-errors ERROR Continue after ERROR (gcov, source) *************** *** 470,476 **** @param = (@param, "--quiet"); } ! if ($nochecksum) { ! @param = (@param, "--no-checksum"); } if ($base_directory) --- 489,502 ---- @param = (@param, "--quiet"); } ! if (defined($checksum)) { ! if ($checksum) ! { ! @param = (@param, "--checksum"); ! } ! else ! { ! @param = (@param, "--no-checksum"); ! } } if ($base_directory) *************** *** 478,482 **** @param = (@param, "--base-directory", $base_directory); } ! if ($compat_libtool) { @param = (@param, "--compat-libtool"); --- 504,512 ---- @param = (@param, "--base-directory", $base_directory); } ! if ($no_compat_libtool) ! { ! @param = (@param, "--no-compat-libtool"); ! } ! elsif ($compat_libtool) { @param = (@param, "--compat-libtool"); *************** *** 610,616 **** @param = (@param, "--quiet"); } ! if ($nochecksum) { ! @param = (@param, "--no-checksum"); } if ($gcov_tool) --- 640,653 ---- @param = (@param, "--quiet"); } ! if (defined($checksum)) { ! if ($checksum) ! { ! @param = (@param, "--checksum"); ! } ! else ! { ! @param = (@param, "--no-checksum"); ! } } if ($gcov_tool) *************** *** 834,838 **** my $negative; # If set, warn about negative counts my $changed_testname; # If set, warn about changed testname ! my $checksum; # Checksum of current line local *INFO_HANDLE; # Filehandle for .info file --- 871,875 ---- my $negative; # If set, warn about negative counts my $changed_testname; # If set, warn about changed testname ! my $line_checksum; # Checksum of current line local *INFO_HANDLE; # Filehandle for .info file *************** *** 939,947 **** if (defined($3)) { ! $checksum = substr($3, 1); # Does it match a previous definition if (defined($checkdata->{$1}) && ! ($checkdata->{$1} ne $checksum)) { die("ERROR: checksum mismatch ". --- 976,985 ---- if (defined($3)) { ! $line_checksum = substr($3, 1); # Does it match a previous definition if (defined($checkdata->{$1}) && ! ($checkdata->{$1} ne ! $line_checksum)) { die("ERROR: checksum mismatch ". *************** *** 949,953 **** } ! $checkdata->{$1} = $checksum; } last; --- 987,991 ---- } ! $checkdata->{$1} = $line_checksum; } last; *************** *** 1439,1443 **** $testcount->{$line}. (defined($checkdata->{$line}) && ! !$nochecksum ? ",".$checkdata->{$line} : "")."\n"); $found++; --- 1477,1481 ---- $testcount->{$line}. (defined($checkdata->{$line}) && ! $checksum ? ",".$checkdata->{$line} : "")."\n"); $found++; |