diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-02-06 16:25:18 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-02-06 16:25:18 +0100 |
commit | ceae5aaa7e5f4fef2f1d82625ef32673438a33f3 (patch) | |
tree | 21dbab3814f871c71b2ddf160c2127540df835ea /mysql-test/lib | |
parent | 78f11e8ee23bb42d193429501038f6030fab38ed (diff) | |
download | mariadb-git-ceae5aaa7e5f4fef2f1d82625ef32673438a33f3.tar.gz |
mtr: allow nested plugin suites to be defaults too
Diffstat (limited to 'mysql-test/lib')
-rw-r--r-- | mysql-test/lib/mtr_cases.pm | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index e6bd18fc363..59216f41cff 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -337,15 +337,20 @@ sub parse_disabled { # sub collect_default_suites(@) { - my @dirs = my_find_dir(dirname($::glob_mysql_test_dir), - [ @plugin_suitedirs ], '*'); - for my $d (@dirs) { - next unless -f "$d/suite.pm"; - my $sname= basename($d); + use File::Find; + my @dirs; + find(sub { + push @dirs, [$File::Find::topdir, $File::Find::name] + if -d and -f "$File::Find::name/suite.pm"; + }, my_find_dir(dirname($::glob_mysql_test_dir), \@plugin_suitedirs)); + + for (@dirs) { + my ($plugin_root, $dir) = @$_; + my $sname= substr $dir, 1 + length $plugin_root; # ignore overlays here, otherwise we'd need accurate # duplicate detection with overlay support for the default suite list next if $sname eq 'main' or -d "$::glob_mysql_test_dir/suite/$sname"; - my $s = load_suite_object($sname, $d); + my $s = load_suite_object($sname, $dir); push @_, $sname if $s->is_default(); } return @_; |