Tests: Ignore debug message in error line

This commit is contained in:
Wilson Snyder 2023-08-12 09:39:02 -04:00
parent bc97319402
commit 9eba61018a
1 changed files with 6 additions and 2 deletions

View File

@ -1680,8 +1680,12 @@ sub _run {
if (!$param{fails} && $status) {
my $firstline = "";
if (my $fh = IO::File->new("<$param{logfile}")) {
$firstline = $fh->getline || '';
chomp $firstline;
while (defined(my $line = $fh->getline)) {
next if $line =~ /^- /; # Debug message
$firstline = $line;
chomp $firstline;
last;
}
}
$self->error("Exec of $param{cmd}[0] failed: $firstline\n");
}