Skip to content

BUGFIX: there may be no GDCA file - e.g., in 'initial' capture. #412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions bin/geninfo
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ sub new
sub worklist
{
my $self = shift;
# we saved the mssages for the end...
# we saved the messages for the end...
foreach my $msg (values %{$self->[2]}) {
lcovutil::ignorable_error($msg->[0], $msg->[1]);
}
Expand Down Expand Up @@ -1323,12 +1323,16 @@ sub gen_info(@)
my @worklist;
my $serialChunk = [1, []];
my $chunk = [0, []]; # [isSerial, [fileList]]
foreach my $j (@$filelist) {
my $filename = $j->[0] . $lcovutil::dirseparator . $j->[1];
if (grep({ $filename =~ $_ } @main::large_files)) {
lcovutil::info(1, "large file: $filename\n");
push(@{$serialChunk->[1]}, $j);
next;
FILE: foreach my $j (@$filelist) {
my ($dir, $gcda, $gcno) = @$j;
foreach my $f ($gcda, $gcno) {
next unless defined($f); # might not be a GCDA file
my $filename = $dir . $lcovutil::dirseparator . $f;
if (grep({ $filename =~ $_ } @main::large_files)) {
lcovutil::info(1, "large file: $filename\n");
push(@{$serialChunk->[1]}, $j);
next FILE;
}
}
push(@{$chunk->[1]}, $j);
if (scalar(@{$chunk->[1]}) == $chunkSize) {
Expand Down
10 changes: 10 additions & 0 deletions tests/bin/test_run
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ if [ ! -z "$TIME" ] ; then
rm -f "$TIMEFILE"
fi

if [ 0 == $RC ] ; then
for str in uninitialized ; do
grep $str $LOGFILE
if [ 0 == $? ] ; then
echo "unexpected '$str' in '$LOGFILE' for $TESTNAME"
RC=1
fi
done
fi

# Save last output line as reason in case of skip result
LAST=$(tail -n 1 "$LOGFILE" | sed -e 's/^ //g')

Expand Down