mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Backport from 5.0 a fix that will start ndb only for tests that needs it
This commit is contained in:
@@ -193,6 +193,28 @@ sub collect_one_test_case($$$$$$) {
|
||||
$tinfo->{'slave_restart'}= 1;
|
||||
}
|
||||
|
||||
# Cluster is needed by test case if testname contains ndb
|
||||
if ( defined mtr_match_substring($tname,"ndb") )
|
||||
{
|
||||
$tinfo->{'ndb_test'}= 1;
|
||||
if ( $::opt_skip_ndbcluster )
|
||||
{
|
||||
# Skip all ndb tests
|
||||
$tinfo->{'skip'}= 1;
|
||||
return;
|
||||
}
|
||||
if ( ! $::opt_with_ndbcluster )
|
||||
{
|
||||
# Ndb is not supported, skip them
|
||||
$tinfo->{'skip'}= 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$tinfo->{'ndb_test'}= 0;
|
||||
}
|
||||
|
||||
# FIXME what about embedded_server + ndbcluster, skip ?!
|
||||
|
||||
my $master_opt_file= "$testdir/$tname-master.opt";
|
||||
|
@@ -50,6 +50,23 @@ sub mtr_match_extension ($$) {
|
||||
}
|
||||
|
||||
|
||||
# Match a substring anywere in a string
|
||||
|
||||
sub mtr_match_substring ($$) {
|
||||
my $string= shift;
|
||||
my $substring= shift;
|
||||
|
||||
if ( $string =~ /(.*)\Q$substring\E(.*)$/ ) # strncmp
|
||||
{
|
||||
return $1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return undef; # NULL
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub mtr_match_any_exact ($$) {
|
||||
my $string= shift;
|
||||
my $mlist= shift;
|
||||
|
Reference in New Issue
Block a user