From 06793d6d91b1d78ef9c455ed9ff2164f6fcb3ee2 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Thu, 9 Jan 2025 14:27:16 -0500 Subject: [PATCH] Pass the --tempdir option from lcov to geninfo lcov invokes geninfo but didn't provide it with the user's --tempdir option value (if specified); pass it down. Signed-off-by: Paul Smith --- bin/lcov | 3 ++- lib/lcovutil.pm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/lcov b/bin/lcov index 0e006684..27488c81 100755 --- a/bin/lcov +++ b/bin/lcov @@ -916,7 +916,8 @@ sub lcov_geninfo(@) push(@param, "--mcdc") if $lcovutil::mcdc_coverage; push(@param, '--fail-under-lines', $lcovutil::fail_under_lines) if defined($lcovutil::fail_under_lines); - + push(@param, '--tempdir', $lcovutil::tempdirname) + if (defined($lcovutil::tempdirname)); foreach my $listOpt (['--comment', \@lcovutil::comments], ['--config-file', \@lcovutil::opt_config_files], ['--rc', \@lcovutil::opt_rc], diff --git a/lib/lcovutil.pm b/lib/lcovutil.pm index 37a3679f..0010bec9 100644 --- a/lib/lcovutil.pm +++ b/lib/lcovutil.pm @@ -1071,7 +1071,7 @@ my (@rc_filter, @rc_ignore, @rc_exclude_patterns, $rc_no_branch_coverage, $rc_no_func_coverage, $rc_no_checksum, $version); my $quiet = 0; -my $tempdirname; +our $tempdirname; # these options used only by lcov - but moved here so that we can # share arg parsing