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