Browse Source

Add support for specifying suites not located in mysql-test/suite/

Example otions that will all run binlog_stm_binlog.test in suite/binlog:
 --suite=binlog binlog.binlog_stm_binlog
 --suite=binlog binlog_stm_binlog
 binlog_stm_binlog
 --suite=suite/binlog binlog.binlog_stm_binlog
 --suite=suite/binlog binlog_stm_binlog
pull/374/head
unknown 18 years ago
parent
commit
ecee2de17f
  1. 23
      mysql-test/lib/mtr_cases.pl

23
mysql-test/lib/mtr_cases.pl

@ -151,20 +151,17 @@ sub collect_one_suite($$)
mtr_verbose("Collecting: $suite");
my $testdir;
my $resdir;
if ( $suite eq "main" )
my $suitedir= "$::glob_mysql_test_dir"; # Default
if ( $suite ne "main" )
{
$testdir= "$::glob_mysql_test_dir/t";
$resdir= "$::glob_mysql_test_dir/r";
}
else
{
$testdir= "$::glob_mysql_test_dir/suite/$suite/t";
$resdir= "$::glob_mysql_test_dir/suite/$suite/r";
$suitedir= mtr_path_exists("$suitedir/suite/$suite",
"$suitedir/$suite");
mtr_verbose("suitedir: $suitedir");
}
my $testdir= "$suitedir/t";
my $resdir= "$suitedir/r";
# ----------------------------------------------------------------------
# Build a hash of disabled testcases for this suite
# ----------------------------------------------------------------------
@ -205,7 +202,7 @@ sub collect_one_suite($$)
$tname = basename($tname);
# Get rid of suite part
$tname =~ s/^$suite\.//;
$tname =~ s/^(.*)\.//;
# Check if the extenstion has been specified.
@ -333,7 +330,7 @@ sub collect_one_test_case($$$$$$$$$) {
my $tinfo= {};
$tinfo->{'name'}= "$suite.$tname";
$tinfo->{'name'}= basename($suite) . ".$tname";
$tinfo->{'result_file'}= "$resdir/$tname.result";
$tinfo->{'component_id'} = $component_id;
push(@$cases, $tinfo);

Loading…
Cancel
Save