aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/pgbench/t/001_pgbench_with_server.pl14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/bin/pgbench/t/001_pgbench_with_server.pl b/src/bin/pgbench/t/001_pgbench_with_server.pl
index 0cf80aba972..ff5b31d4df1 100644
--- a/src/bin/pgbench/t/001_pgbench_with_server.pl
+++ b/src/bin/pgbench/t/001_pgbench_with_server.pl
@@ -1199,8 +1199,18 @@ sub check_pgbench_logs
my $clen = @contents;
ok( $min <= $clen && $clen <= $max,
"transaction count for $log ($clen)");
- ok( grep(/$re/, @contents) == $clen,
- "transaction format for $prefix");
+ my $clen_match = grep(/$re/, @contents);
+ ok($clen_match == $clen, "transaction format for $prefix");
+ # Show more information if some logs don't match
+ # to help with debugging.
+ if ($clen_match != $clen)
+ {
+ foreach my $log (@contents)
+ {
+ print "# Log entry not matching: $log\n"
+ unless $log =~ /$re/;
+ }
+ }
close $fh or die "$@";
};
}