Commit d8f96a37 authored by Bjorn Munch's avatar Bjorn Munch

Bug #48806 mysql-test-run.pl --help should work even in the absence of binaries

Searches for my_safe_process binary too early
Put this into a sub() and call it after examining options (incl. --help)
parent dcd1dee1
...@@ -81,24 +81,28 @@ sub is_child { ...@@ -81,24 +81,28 @@ sub is_child {
} }
# Find the safe process binary or script
my @safe_process_cmd; my @safe_process_cmd;
my $safe_kill; my $safe_kill;
if (IS_WIN32PERL or IS_CYGWIN){
# Use my_safe_process.exe # Find the safe process binary or script
my $exe= my_find_bin(".", ["lib/My/SafeProcess", "My/SafeProcess"], sub find_bin {
"my_safe_process"); if (IS_WIN32PERL or IS_CYGWIN)
push(@safe_process_cmd, $exe); {
# Use my_safe_process.exe
# Use my_safe_kill.exe my $exe= my_find_bin(".", ["lib/My/SafeProcess", "My/SafeProcess"],
$safe_kill= my_find_bin(".", "lib/My/SafeProcess", "my_safe_kill"); "my_safe_process");
} push(@safe_process_cmd, $exe);
else
{ # Use my_safe_kill.exe
# Use my_safe_process $safe_kill= my_find_bin(".", "lib/My/SafeProcess", "my_safe_kill");
my $exe= my_find_bin(".", ["lib/My/SafeProcess", "My/SafeProcess"], }
"my_safe_process"); else
push(@safe_process_cmd, $exe); {
# Use my_safe_process
my $exe= my_find_bin(".", ["lib/My/SafeProcess", "My/SafeProcess"],
"my_safe_process");
push(@safe_process_cmd, $exe);
}
} }
......
...@@ -266,6 +266,9 @@ sub main { ...@@ -266,6 +266,9 @@ sub main {
command_line_setup(); command_line_setup();
# --help will not reach here, so now it's safe to assume we have binaries
My::SafeProcess::find_bin();
if ( $opt_gcov ) { if ( $opt_gcov ) {
gcov_prepare($basedir); gcov_prepare($basedir);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment