diff --git a/bin/pt-config-diff b/bin/pt-config-diff index 8ebd2a10..13135be2 100755 --- a/bin/pt-config-diff +++ b/bin/pt-config-diff @@ -1466,7 +1466,6 @@ use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); use Scalar::Util qw(blessed); - use constant { PTDEBUG => $ENV{PTDEBUG} || 0, PERCONA_TOOLKIT_TEST_USE_DSN_NAMES => $ENV{PERCONA_TOOLKIT_TEST_USE_DSN_NAMES} || 0, diff --git a/bin/pt-kill b/bin/pt-kill index 7af09248..bd4ad680 100755 --- a/bin/pt-kill +++ b/bin/pt-kill @@ -4715,7 +4715,6 @@ use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); use Scalar::Util qw(blessed); - use constant { PTDEBUG => $ENV{PTDEBUG} || 0, PERCONA_TOOLKIT_TEST_USE_DSN_NAMES => $ENV{PERCONA_TOOLKIT_TEST_USE_DSN_NAMES} || 0, diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index 5829bfc7..dd60f2cc 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -3345,7 +3345,6 @@ use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); use Scalar::Util qw(blessed); - use constant { PTDEBUG => $ENV{PTDEBUG} || 0, PERCONA_TOOLKIT_TEST_USE_DSN_NAMES => $ENV{PERCONA_TOOLKIT_TEST_USE_DSN_NAMES} || 0, diff --git a/lib/Cxn.pm b/lib/Cxn.pm index 8b54e726..df7f6ce4 100644 --- a/lib/Cxn.pm +++ b/lib/Cxn.pm @@ -36,7 +36,6 @@ use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); use Scalar::Util qw(blessed); - use constant { PTDEBUG => $ENV{PTDEBUG} || 0, # Hostnames make testing less accurate. Tests need to see diff --git a/lib/Sandbox.pm b/lib/Sandbox.pm index a2f9a5f0..3a3f4d40 100644 --- a/lib/Sandbox.pm +++ b/lib/Sandbox.pm @@ -76,7 +76,7 @@ sub use { return if !defined $cmd || !$cmd; my $use = $self->_use_for($server) . " $cmd"; PTDEBUG && _d('"Executing', $use, 'on', $server); - my $out = `$use`; + my $out = `$use 2>&1`; if ( $? >> 8 ) { die "Failed to execute $cmd on $server: $out"; } @@ -143,7 +143,7 @@ sub load_file { my $use = $self->_use_for($server) . " $d < $file"; PTDEBUG && _d('Loading', $file, 'on', $server, ':', $use); - my $out = `$use`; + my $out = `$use 2>&1`; if ( $? >> 8 ) { die "Failed to execute $file on $server: $out"; } diff --git a/t/lib/Cxn.t b/t/lib/Cxn.t index 42933ae7..75355b76 100644 --- a/t/lib/Cxn.t +++ b/t/lib/Cxn.t @@ -9,8 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More; -use Data::Dumper; +use Test::More tests => 19; use Sandbox; use OptionParser; @@ -18,7 +17,8 @@ use DSNParser; use Quoter; use PerconaTest; use Cxn; -use VersionParser; + +use Data::Dumper; my $q = new Quoter(); my $dp = new DSNParser(opts=>$dsn_opts); @@ -248,10 +248,12 @@ is_deeply( "Default cxn inherits default connection options" ); +@ARGV = (); +$o->get_opts(); + # ############################################################################# # Done. # ############################################################################# $master_dbh->disconnect() if $master_dbh; ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); -done_testing; exit;