Add $Test::Builder::Level to pgbench test functions

same as c4309f4aee
This commit is contained in:
Peter Eisentraut 2018-07-03 18:23:50 +02:00
parent 6837078687
commit 2c059c86ba
2 changed files with 8 additions and 0 deletions

View File

@ -13,6 +13,8 @@ $node->start;
# invoke pgbench
sub pgbench
{
local $Test::Builder::Level = $Test::Builder::Level + 1;
my ($opts, $stat, $out, $err, $name, $files) = @_;
my @cmd = ('pgbench', split /\s+/, $opts);
my @filenames = ();
@ -798,6 +800,8 @@ pgbench(
# check log contents and cleanup
sub check_pgbench_logs
{
local $Test::Builder::Level = $Test::Builder::Level + 1;
my ($prefix, $nb, $min, $max, $re) = @_;
my @logs = glob "$prefix.*";

View File

@ -20,6 +20,8 @@ mkdir $testdir
# invoke pgbench
sub pgbench
{
local $Test::Builder::Level = $Test::Builder::Level + 1;
my ($opts, $stat, $out, $err, $name) = @_;
print STDERR "opts=$opts, stat=$stat, out=$out, err=$err, name=$name";
command_checks_all([ 'pgbench', split(/\s+/, $opts) ],
@ -30,6 +32,8 @@ sub pgbench
# invoke pgbench with scripts
sub pgbench_scripts
{
local $Test::Builder::Level = $Test::Builder::Level + 1;
my ($opts, $stat, $out, $err, $name, $files) = @_;
my @cmd = ('pgbench', split /\s+/, $opts);
my @filenames = ();