From: Peter O. <obe...@us...> - 2010-08-24 16:16:01
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv24622/bin Modified Files: genhtml geninfo lcov Log Message: lcov: add option to specify a configuration file Provide an option for users to specify a configuration file to lcov. This option may be useful when there is a need to run several instances of a tool with different configuration file options in parallel. Index: geninfo =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/geninfo,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** geninfo 23 Aug 2010 14:47:38 -0000 1.84 --- geninfo 24 Aug 2010 16:15:53 -0000 1.85 *************** *** 186,189 **** --- 186,190 ---- our @gcov_options; our @internal_dirs; + our $opt_config_file; our $cwd = `pwd`; *************** *** 206,211 **** $ENV{"LANG"} = "C"; # Read configuration file if available ! if (defined($ENV{"HOME"}) && (-r $ENV{"HOME"}."/.lcovrc")) { $config = read_config($ENV{"HOME"}."/.lcovrc"); --- 207,219 ---- $ENV{"LANG"} = "C"; + # Check command line for a configuration file name + Getopt::Long::Configure("pass_through", "no_auto_abbrev"); + GetOptions("config-file:s" => \$opt_config_file); + Getopt::Long::Configure("default"); + # Read configuration file if available ! if (defined($opt_config_file)) { ! $config = read_config($opt_config_file); ! } elsif (defined($ENV{"HOME"}) && (-r $ENV{"HOME"}."/.lcovrc")) { $config = read_config($ENV{"HOME"}."/.lcovrc"); *************** *** 488,491 **** --- 496,500 ---- --derive-func-data Generate function data from line data --(no-)external Include (ignore) data for external files + --config-file FILENAME Specify configuration file location For more information see: $lcov_url Index: genhtml =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/genhtml,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** genhtml 20 Aug 2010 14:31:59 -0000 1.55 --- genhtml 24 Aug 2010 16:15:53 -0000 1.56 *************** *** 289,292 **** --- 289,293 ---- our @opt_ignore_errors; # Ignore certain error classes during processing our @ignore; + our $opt_config_file; # User-specified configuration file location our $charset = "UTF-8"; # Default charset for HTML pages our @fileview_sortlist; *************** *** 317,322 **** } # Read configuration file if available ! if (defined($ENV{"HOME"}) && (-r $ENV{"HOME"}."/.lcovrc")) { $config = read_config($ENV{"HOME"}."/.lcovrc"); --- 318,330 ---- } + # Check command line for a configuration file name + Getopt::Long::Configure("pass_through", "no_auto_abbrev"); + GetOptions("config-file:s" => \$opt_config_file); + Getopt::Long::Configure("default"); + # Read configuration file if available ! if (defined($opt_config_file)) { ! $config = read_config($opt_config_file); ! } elsif (defined($ENV{"HOME"}) && (-r $ENV{"HOME"}."/.lcovrc")) { $config = read_config($ENV{"HOME"}."/.lcovrc"); *************** *** 557,560 **** --- 565,570 ---- -v, --version Print version number, then exit -q, --quiet Do not print progress messages + --config-file FILENAME Specify configuration file location + --ignore-errors ERRORS Continue after ERRORS (source) Operation: *************** *** 583,587 **** --(no-)sort Enable (disable) sorted coverage views --demangle-cpp Demangle C++ function names - --ignore-errors ERRORS Continue after ERRORS (source) For more information see: $lcov_url --- 593,596 ---- Index: lcov =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/lcov,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** lcov 23 Aug 2010 16:14:37 -0000 1.78 --- lcov 24 Aug 2010 16:15:53 -0000 1.79 *************** *** 190,193 **** --- 190,194 ---- our $opt_external; our $opt_no_external; + our $opt_config_file; our @opt_summary; our $ln_overall_found; *************** *** 217,222 **** } # Read configuration file if available ! if (defined($ENV{"HOME"}) && (-r $ENV{"HOME"}."/.lcovrc")) { $config = read_config($ENV{"HOME"}."/.lcovrc"); --- 218,230 ---- } + # Check command line for a configuration file name + Getopt::Long::Configure("pass_through", "no_auto_abbrev"); + GetOptions("config-file:s" => \$opt_config_file); + Getopt::Long::Configure("default"); + # Read configuration file if available ! if (defined($opt_config_file)) { ! $config = read_config($opt_config_file); ! } elsif (defined($ENV{"HOME"}) && (-r $ENV{"HOME"}."/.lcovrc")) { $config = read_config($ENV{"HOME"}."/.lcovrc"); *************** *** 514,517 **** --- 522,526 ---- --list-full-path Print full path during a list operation --(no-)external Include (ignore) data for external files + --config-file FILENAME Specify configuration file location For more information see: $lcov_url |