1
0
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:
msvensson@neptunus.(none)
2006-08-25 15:17:03 +02:00
parent 31aa966718
commit f0c4aba723
3 changed files with 65 additions and 2 deletions

View File

@@ -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";

View File

@@ -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;