1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-04 01:23:45 +03:00

Added some extra optional path to test suites

This commit is contained in:
Bjorn Munch
2012-05-15 09:14:44 +02:00
parent b76a59f5a6
commit e7b735fb4b
2 changed files with 8 additions and 6 deletions

View File

@ -126,9 +126,9 @@ sub my_find_file {
# #
# #
sub my_find_dir { sub my_find_dir {
my ($base, $paths, $dirs, $required)= @_; my ($base, $paths, $dirs, $optional)= @_;
croak "usage: my_find_dir(<base>, <paths>[, <dirs>])" croak "usage: my_find_dir(<base>, <paths>[, <dirs>[, <optional>]])"
unless (@_ == 3 or @_ == 2); unless (@_ == 3 or @_ == 2 or @_ == 4);
# ------------------------------------------------------- # -------------------------------------------------------
# Find and return the first directory # Find and return the first directory
@ -136,6 +136,7 @@ sub my_find_dir {
foreach my $path (my_find_paths($base, $paths, $dirs)) { foreach my $path (my_find_paths($base, $paths, $dirs)) {
return $path if ( -d $path ); return $path if ( -d $path );
} }
return "" if $optional;
find_error($base, $paths, $dirs); find_error($base, $paths, $dirs);
} }

View File

@ -127,6 +127,7 @@ sub collect_test_cases ($$$) {
{ {
push(@$cases, collect_one_suite($suite, $opt_cases)); push(@$cases, collect_one_suite($suite, $opt_cases));
last if $some_test_found; 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, $suitedir= my_find_dir($suitedir,
["suite", ["suite",
".", ".",
# Look in storage engine specific suite dirs "../internal/mysql-test/suite"
"../storage/*/mysql-test-suites"
], ],
[$suite]); [$suite], ($suite =~ /^i_/));
return unless $suitedir;
} }
mtr_verbose("suitedir: $suitedir"); mtr_verbose("suitedir: $suitedir");
} }