diff options
author | Bjorn Munch <bjorn.munch@oracle.com> | 2012-05-15 09:14:44 +0200 |
---|---|---|
committer | Bjorn Munch <bjorn.munch@oracle.com> | 2012-05-15 09:14:44 +0200 |
commit | e72278fd423d98181d1c4da34e8369e7219b05f8 (patch) | |
tree | 0f4740e84c497c125624c501821044dadfd6d094 /mysql-test/lib | |
parent | 391ea219c21a66e24ea9985ca2581f75bbd7c8f5 (diff) | |
download | mariadb-git-e72278fd423d98181d1c4da34e8369e7219b05f8.tar.gz |
Added some extra optional path to test suites
Diffstat (limited to 'mysql-test/lib')
-rw-r--r-- | mysql-test/lib/My/Find.pm | 7 | ||||
-rw-r--r-- | mysql-test/lib/mtr_cases.pm | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/mysql-test/lib/My/Find.pm b/mysql-test/lib/My/Find.pm index 0fffc0d7fd7..2730f83a496 100644 --- a/mysql-test/lib/My/Find.pm +++ b/mysql-test/lib/My/Find.pm @@ -126,9 +126,9 @@ sub my_find_file { # # sub my_find_dir { - my ($base, $paths, $dirs, $required)= @_; - croak "usage: my_find_dir(<base>, <paths>[, <dirs>])" - unless (@_ == 3 or @_ == 2); + my ($base, $paths, $dirs, $optional)= @_; + croak "usage: my_find_dir(<base>, <paths>[, <dirs>[, <optional>]])" + unless (@_ == 3 or @_ == 2 or @_ == 4); # ------------------------------------------------------- # Find and return the first directory @@ -136,6 +136,7 @@ sub my_find_dir { foreach my $path (my_find_paths($base, $paths, $dirs)) { return $path if ( -d $path ); } + return "" if $optional; find_error($base, $paths, $dirs); } diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 90045d855ab..19eaac6747c 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -127,6 +127,7 @@ sub collect_test_cases ($$$) { { push(@$cases, collect_one_suite($suite, $opt_cases)); last if $some_test_found; + push(@$cases, collect_one_suite("i_".$suite, $opt_cases)); } } @@ -277,10 +278,10 @@ sub collect_one_suite($) $suitedir= my_find_dir($suitedir, ["suite", ".", - # Look in storage engine specific suite dirs - "../storage/*/mysql-test-suites" + "../internal/mysql-test/suite" ], - [$suite]); + [$suite], ($suite =~ /^i_/)); + return unless $suitedir; } mtr_verbose("suitedir: $suitedir"); } |