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
This commit is contained in:
parent
fd47c80e6d
commit
3674c72d20
@ -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;
|
|||||||
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($)
|
|||||||
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";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user