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,10 +81,13 @@ sub is_child {
}
# Find the safe process binary or script
my @safe_process_cmd;
my $safe_kill;
if (IS_WIN32PERL or IS_CYGWIN){
# Find the safe process binary or script
sub find_bin {
if (IS_WIN32PERL or IS_CYGWIN)
{
# Use my_safe_process.exe
my $exe= my_find_bin(".", ["lib/My/SafeProcess", "My/SafeProcess"],
"my_safe_process");
......@@ -92,13 +95,14 @@ if (IS_WIN32PERL or IS_CYGWIN){
# Use my_safe_kill.exe
$safe_kill= my_find_bin(".", "lib/My/SafeProcess", "my_safe_kill");
}
else
{
}
else
{
# 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 {
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 ) {
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