Commit ecee2de1 authored by unknown's avatar unknown

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
 

parent 943ed8fe
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment