Skip to content

Commit b672a74

Browse files
committed
Add option to set tool name used in messages.
Reduce confusion when 'geninfo' errors reported when user invoked 'lcov --capture ...'. Signed-off-by: Henry Cox <[email protected]>
1 parent 146a4ed commit b672a74

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

bin/lcov

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,8 @@ sub lcov_geninfo(@)
817817
# Capture data
818818
info("Capturing coverage data from " . join(" ", @dir) . "\n");
819819
@param = (File::Spec->catfile($tool_dir, 'geninfo'), @dir);
820+
# make things less confusing for user, by using the name they actually invoked
821+
push(@param, '--toolname', $lcovutil::tool_name);
820822
if ($output_filename) {
821823
push(@param, "--output-filename", $output_filename);
822824
}

lib/lcovutil.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,6 +1228,7 @@ our %argCommon = ("tempdir=s" => \$tempdirname,
12281228
"help|h|?" => \$help,
12291229
"version" => \$version,
12301230
'comment=s' => \@comments,
1231+
'toolname=s' => \$lcovutil::tool_name,
12311232

12321233
"function-coverage" => \$lcovutil::func_coverage,
12331234
"branch-coverage" => \$lcovutil::br_coverage,

0 commit comments

Comments
 (0)