Commit d40cdc39 authored by unknown's avatar unknown

Improve 'collect_one_suite' so it looks in storage/*/mysql-test-suites by default

Also make it possible to specify a path to the suite, for example:
./mtr --suite=/some/path/to/suitedir 


mysql-test/lib/My/Find.pm:
  Extend 'my_find_paths' to glob path names
parent b8ba8b60
...@@ -168,6 +168,12 @@ sub my_find_paths { ...@@ -168,6 +168,12 @@ sub my_find_paths {
@paths= map { "$base/$_" } @paths; @paths= map { "$base/$_" } @paths;
#print "paths: @paths\n"; #print "paths: @paths\n";
# -------------------------------------------------------
# Glob all paths to expand wildcards
# -------------------------------------------------------
@paths= map { glob("$_") } @paths;
#print "paths: @paths\n";
# ------------------------------------------------------- # -------------------------------------------------------
# Return the list of paths # Return the list of paths
# ------------------------------------------------------- # -------------------------------------------------------
......
...@@ -55,6 +55,7 @@ use File::Basename; ...@@ -55,6 +55,7 @@ use File::Basename;
use IO::File(); use IO::File();
use My::Config; use My::Config;
use My::Platform; use My::Platform;
use My::Find;
require "mtr_misc.pl"; require "mtr_misc.pl";
...@@ -248,11 +249,20 @@ sub collect_one_suite($) ...@@ -248,11 +249,20 @@ sub collect_one_suite($)
my $suitedir= "$::glob_mysql_test_dir"; # Default my $suitedir= "$::glob_mysql_test_dir"; # Default
if ( $suite ne "main" ) if ( $suite ne "main" )
{ {
$suitedir= mtr_path_exists("$suitedir/suite/$suite", if ( -d $suite ){
"$suitedir/$suite"); $suitedir= $suite;
}
else
{
$suitedir= my_find_dir($::basedir,
["mysql-test/suite",
"mysql-test",
# Look in storage engine specific suite dirs
"storage/*/mysql-test-suites"
],
[$suite]);
}
mtr_verbose("suitedir: $suitedir"); mtr_verbose("suitedir: $suitedir");
} }
my $testdir= "$suitedir/t"; my $testdir= "$suitedir/t";
......
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