1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

merge from trunk

This commit is contained in:
Bjorn Munch
2010-07-23 15:12:58 +02:00
724 changed files with 16479 additions and 13823 deletions

View File

@ -104,10 +104,11 @@ sub init_pattern {
#
##############################################################################
sub collect_test_cases ($$$) {
sub collect_test_cases ($$$$) {
my $opt_reorder= shift; # True if we're reordering tests
my $suites= shift; # Semicolon separated list of test suites
my $opt_cases= shift;
my $opt_skip_test_list= shift;
my $cases= []; # Array of hash(one hash for each testcase)
$do_test_reg= init_pattern($do_test, "--do-test");
@ -131,7 +132,7 @@ sub collect_test_cases ($$$) {
{
foreach my $suite (split(",", $suites))
{
push(@$cases, collect_one_suite($suite, $opt_cases));
push(@$cases, collect_one_suite($suite, $opt_cases, $opt_skip_test_list));
last if $some_test_found;
}
}
@ -256,6 +257,7 @@ sub collect_one_suite($)
{
my $suite= shift; # Test suite name
my $opt_cases= shift;
my $opt_skip_test_list= shift;
my @cases; # Array of hash
mtr_verbose("Collecting: $suite");
@ -317,18 +319,23 @@ sub collect_one_suite($)
# Build a hash of disabled testcases for this suite
# ----------------------------------------------------------------------
my %disabled;
if ( open(DISABLED, "$testdir/disabled.def" ) )
{
while ( <DISABLED> )
my @disabled_collection= @{$opt_skip_test_list} if defined @{$opt_skip_test_list};
unshift (@disabled_collection, "$testdir/disabled.def");
for my $skip (@disabled_collection)
{
if ( open(DISABLED, $skip ) )
{
chomp;
if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
while ( <DISABLED> )
{
$disabled{$1}= $2;
chomp;
if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
{
$disabled{$1}= $2 if not exists $disabled{$1};
}
}
close DISABLED;
}
close DISABLED;
}
}
# Read suite.opt file
my $suite_opt_file= "$testdir/suite.opt";