1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Windows fixeds for mtr

CMakeLists.txt:
  Add CMakeLists.txt in mysql-test/lib/My/SafeProcess/
mysql-test/lib/My/Find.pm:
  Fix for windows
mysql-test/lib/My/SafeProcess.pm:
  Fix Tim's review comments
mysql-test/lib/mtr_misc.pl:
  Rename glob_win32 to is_win32
mysql-test/mysql-test-run.pl:
  Move set_mtr_build_thread_ports earlier
  Set MTR_BUILD_THREAD if to the used value
mysql-test/lib/My/SafeProcess/CMakeLists.txt:
  New BitKeeper file ``mysql-test/lib/My/SafeProcess/CMakeLists.txt''
This commit is contained in:
unknown
2007-12-19 12:58:06 +01:00
parent 516a843b52
commit 23f0c6d4fc
6 changed files with 75 additions and 34 deletions

View File

@ -86,23 +86,26 @@ BEGIN {
}
# Find the safe process binary or script
my $safe_path= $^X; # Path to perl binary
my $safe_script;
my @safe_process_cmd;
my $safe_kill;
if (IS_WIN32PERL or IS_CYGWIN){
# Use my_safe_process.exe
$safe_path= my_find_bin(("extra","bin"), "my_safe_process.exe");
die "Could not find my_safe_process.exe" unless $safe_path;
my $exe= my_find_bin(".", "lib/My/SafeProcess", "my_safe_process.exe");
die "Could not find my_safe_process.exe" unless $exe;
push(@safe_process_cmd, $exe);
# Use my_safe_kill.exe
$safe_path= my_find_bin(("extra","bin"), "my_safe_kill");
my $safe_kill= my_find_bin(".", "lib/My/SafeProcess", "my_safe_kill");
die "Could not find my_safe_kill.exe" unless $safe_kill;
}
else {
# Use safe_process.pl
$safe_script= "lib/My/SafeProcess/safe_process.pl";
$safe_script= "../$safe_script" unless -f $safe_script;
die "Could not find safe_process.pl" unless -f $safe_script;
my $script= "lib/My/SafeProcess/safe_process.pl";
$script= "../$script" unless -f $script;
die "Could not find safe_process.pl" unless -f $script;
# Call $script with Perl interpreter
push(@safe_process_cmd, $^X, $script);
}
@ -124,9 +127,9 @@ sub new {
my $host = delete($opts{'host'});
my $shutdown = delete($opts{'shutdown'});
if (defined $host) {
$safe_script= "lib/My/SafeProcess/safe_process_cpcd.pl";
}
# if (defined $host) {
# $safe_script= "lib/My/SafeProcess/safe_process_cpcd.pl";
# }
if (IS_CYGWIN){
# safe_procss is a windows program and need
@ -138,6 +141,7 @@ sub new {
}
my @safe_args;
my ($safe_path, $safe_script)= @safe_process_cmd;
push(@safe_args, $safe_script) if defined $safe_script;
push(@safe_args, "--verbose") if $verbose > 0;