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)
This commit is contained in:
parent
052688855e
commit
242f3f8cdd
@ -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
|
|
||||||
my $exe= my_find_bin(".", ["lib/My/SafeProcess", "My/SafeProcess"],
|
|
||||||
"my_safe_process");
|
|
||||||
push(@safe_process_cmd, $exe);
|
|
||||||
|
|
||||||
# Use my_safe_kill.exe
|
# Find the safe process binary or script
|
||||||
$safe_kill= my_find_bin(".", "lib/My/SafeProcess", "my_safe_kill");
|
sub find_bin {
|
||||||
}
|
if (IS_WIN32PERL or IS_CYGWIN)
|
||||||
else
|
{
|
||||||
{
|
# Use my_safe_process.exe
|
||||||
# Use my_safe_process
|
my $exe= my_find_bin(".", ["lib/My/SafeProcess", "My/SafeProcess"],
|
||||||
my $exe= my_find_bin(".", ["lib/My/SafeProcess", "My/SafeProcess"],
|
"my_safe_process");
|
||||||
"my_safe_process");
|
push(@safe_process_cmd, $exe);
|
||||||
push(@safe_process_cmd, $exe);
|
|
||||||
|
# Use my_safe_kill.exe
|
||||||
|
$safe_kill= my_find_bin(".", "lib/My/SafeProcess", "my_safe_kill");
|
||||||
|
}
|
||||||
|
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();
|
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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user