mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fixed unit test to not 'bail out' if some tests are not compiled.
Before the changes two things could happen: - "path required name explain_filename path" error - unit test never finishead (as it tried to execute just /bin/sh as a test case)
This commit is contained in:
@@ -20,7 +20,6 @@ sub start_test {
|
|||||||
($path, $args) = ($cmd, , [ ])
|
($path, $args) = ($cmd, , [ ])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
my $oldpwd=getcwd();
|
my $oldpwd=getcwd();
|
||||||
chdir $::opt_vardir;
|
chdir $::opt_vardir;
|
||||||
my $proc=My::SafeProcess->new
|
my $proc=My::SafeProcess->new
|
||||||
@@ -44,15 +43,17 @@ sub start_test {
|
|||||||
my (@ctest_list)= `cd "$bin" && ctest $ctest_vs --show-only --verbose`;
|
my (@ctest_list)= `cd "$bin" && ctest $ctest_vs --show-only --verbose`;
|
||||||
return "No ctest" if $?;
|
return "No ctest" if $?;
|
||||||
|
|
||||||
|
$ENV{MYSQL_TEST_PLUGINDIR}=$::plugindir;
|
||||||
|
|
||||||
my ($command, %tests, $prefix);
|
my ($command, %tests, $prefix);
|
||||||
for (@ctest_list) {
|
for (@ctest_list) {
|
||||||
chomp;
|
chomp;
|
||||||
if (/^\d+: Test command: +/) {
|
if (/^\d+: Test command: +([^ \t]+)/) {
|
||||||
$command= $';
|
$command= $1;
|
||||||
$prefix= /libmariadb/ ? 'conc_' : '';
|
$prefix= /libmariadb/ ? 'conc_' : '';
|
||||||
} elsif (/^ +Test +#\d+: +/) {
|
} elsif (/^ +Test +#\d+: ([^ \t]+)/) {
|
||||||
if ($command ne "NOT_AVAILABLE") {
|
if ($command ne "NOT_AVAILABLE" && $command ne "/bin/sh") {
|
||||||
$tests{$prefix.$'}=$command;
|
$tests{$prefix.$1}=$command;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user