mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-25 21:54:48 +00:00
Merge 2.1 r518.
This commit is contained in:
@@ -15,6 +15,8 @@ use IPC::Cmd qw(run can_run);
|
||||
use PerconaTest;
|
||||
use Percona::Toolkit;
|
||||
|
||||
use File::Temp qw(tempfile);
|
||||
|
||||
my $version = $Percona::Toolkit::VERSION;
|
||||
|
||||
my $perl = $^X;
|
||||
@@ -42,13 +44,15 @@ foreach my $tool ( @vc_tools ) {
|
||||
|
||||
next unless $is_perl;
|
||||
|
||||
my ($fh, $filename) = tempfile( "pt-version-test-XXXXXXX", UNLINK => 1 );
|
||||
print { $fh } "require q{$tool}; print \$Percona::Toolkit::VERSION, qq{\\n}";
|
||||
close $fh;
|
||||
|
||||
my ($success, undef, $full_buf) =
|
||||
run(
|
||||
command => [ $perl, '-le', "require q{$tool}; print \$Percona::Toolkit::VERSION"]
|
||||
);
|
||||
run( command => [ $perl, $filename ] );
|
||||
|
||||
if ( !$success ) {
|
||||
fail("Failed to get \$Percona::Toolkit::VERSION from $base: $full_buf")
|
||||
fail("Failed to get \$Percona::Toolkit::VERSION from $base: " . $full_buf ? join("", @$full_buf) : '')
|
||||
}
|
||||
else {
|
||||
chomp(@$full_buf);
|
||||
|
@@ -119,7 +119,7 @@ test_v(
|
||||
|
||||
use File::Spec;
|
||||
{
|
||||
local $ENV{PATH} = "$ENV{PATH}:" . File::Spec->catfile($ENV{PERCONA_TOOLKIT_BRANCH}, "bin");
|
||||
local $ENV{PATH} = File::Spec->catfile($ENV{PERCONA_TOOLKIT_BRANCH}, "bin") . ":$ENV{PATH}";
|
||||
test_v(
|
||||
name => "bin_version",
|
||||
response => "pt-archiver;bin_version\n",
|
||||
|
Reference in New Issue
Block a user