mirror of
https://github.com/MariaDB/server.git
synced 2026-04-24 17:25:31 +02:00
merge 5.2
This commit is contained in:
commit
41d432462b
1622 changed files with 29021 additions and 44282 deletions
|
|
@ -154,7 +154,6 @@ sub fix_secure_file_priv {
|
|||
|
||||
sub fix_std_data {
|
||||
my ($self, $config, $group_name, $group)= @_;
|
||||
#return "$::opt_vardir/std_data";
|
||||
my $testdir= $self->get_testdir($group);
|
||||
return "$testdir/std_data";
|
||||
}
|
||||
|
|
@ -364,7 +363,7 @@ sub post_check_client_group {
|
|||
|
||||
if (! defined $option){
|
||||
#print $config;
|
||||
croak "Could not get value for '$name_from'";
|
||||
croak "Could not get value for '$name_from' for test $self->{testname}";
|
||||
}
|
||||
$config->insert($client_group_name, $name_to, $option->value())
|
||||
}
|
||||
|
|
@ -450,9 +449,9 @@ sub resolve_at_variable {
|
|||
$after = $';
|
||||
chop($group_name);
|
||||
|
||||
my $from_group= $config->group($group_name)
|
||||
or croak "There is no group named '$group_name' that ",
|
||||
"can be used to resolve '$option_name'";
|
||||
my $from_group= $config->group($group_name)
|
||||
or croak "There is no group named '$group_name' that ",
|
||||
"can be used to resolve '$option_name' for test '$self->{testname}'";
|
||||
|
||||
my $value= $from_group->value($option_name);
|
||||
$res .= $before.$value;
|
||||
|
|
@ -620,6 +619,7 @@ sub new_config {
|
|||
ARGS => $args,
|
||||
PORT => $args->{baseport},
|
||||
SERVER_ID => 1,
|
||||
testname => $args->{testname},
|
||||
}, $class;
|
||||
|
||||
# add auto-options
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- cperl -*-
|
||||
# Copyright (C) 2005-2006 MySQL AB
|
||||
#
|
||||
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
|
|
@ -91,15 +91,16 @@ sub init_pattern {
|
|||
|
||||
sub testcase_sort_order {
|
||||
my ($a, $b, $sort_criteria)= @_;
|
||||
my $a_sort_criteria= $sort_criteria->{$a->fullname()};
|
||||
my $b_sort_criteria= $sort_criteria->{$b->fullname()};
|
||||
my $res= $a_sort_criteria cmp $b_sort_criteria;
|
||||
return $res if $res;
|
||||
# Run slow tests first, trying to avoid getting stuck at the end
|
||||
# with a slow test in one worker and the other workers idle.
|
||||
return -1 if $a->{'long_test'} && !$b->{'long_test'};
|
||||
return 1 if !$a->{'long_test'} && $b->{'long_test'};
|
||||
|
||||
my $a_sort_criteria= $sort_criteria->{$a->fullname()};
|
||||
my $b_sort_criteria= $sort_criteria->{$b->fullname()};
|
||||
my $res= $a_sort_criteria cmp $b_sort_criteria;
|
||||
return $res if $res;
|
||||
|
||||
return $a->fullname() cmp $b->fullname();
|
||||
}
|
||||
|
||||
|
|
@ -143,7 +144,7 @@ sub collect_test_cases ($$$) {
|
|||
{
|
||||
last unless $opt_reorder;
|
||||
# test->{name} is always in suite.name format
|
||||
if ( $test->{name} =~ /.*\.$tname/ )
|
||||
if ( $test->{name} =~ /^$sname.*\.$tname$/ )
|
||||
{
|
||||
$found= 1;
|
||||
last;
|
||||
|
|
@ -183,12 +184,21 @@ sub collect_test_cases ($$$) {
|
|||
# Append the criteria for sorting, in order of importance.
|
||||
#
|
||||
push(@criteria, "ndb=" . ($tinfo->{'ndb_test'} ? "A" : "B"));
|
||||
push(@criteria, $tinfo->{template_path});
|
||||
# Group test with equal options together.
|
||||
# Ending with "~" makes empty sort later than filled
|
||||
my $opts= $tinfo->{'master_opt'} ? $tinfo->{'master_opt'} : [];
|
||||
push(@criteria, join("!", sort @{$opts}) . "~");
|
||||
# Add slave opts if any
|
||||
if ($tinfo->{'slave_opt'})
|
||||
{
|
||||
push(@criteria, join("!", sort @{$tinfo->{'slave_opt'}}));
|
||||
}
|
||||
# This sorts tests with force-restart *before* identical tests
|
||||
push(@criteria, $tinfo->{force_restart} ? "force-restart" : "no-restart");
|
||||
|
||||
$sort_criteria{$tinfo->fullname()} = join(" ", @criteria);
|
||||
$tinfo->{criteria}= join(" ", @criteria);
|
||||
$sort_criteria{$tinfo->fullname()} = $tinfo->{criteria};
|
||||
}
|
||||
|
||||
@$cases = sort { testcase_sort_order($a, $b, \%sort_criteria) } @$cases;
|
||||
|
|
@ -196,9 +206,10 @@ sub collect_test_cases ($$$) {
|
|||
# For debugging the sort-order
|
||||
# foreach my $tinfo (@$cases)
|
||||
# {
|
||||
# print $sort_criteria{$tinfo->fullname()}," -> \t",$tinfo->fullname(),"\n";
|
||||
# my $tname= $tinfo->{name} . ' ' . $tinfo->{combination};
|
||||
# my $crit= $tinfo->{criteria};
|
||||
# print("$tname\n\t$crit\n");
|
||||
# }
|
||||
|
||||
}
|
||||
|
||||
if (defined $print_testcases){
|
||||
|
|
@ -902,9 +913,14 @@ sub collect_one_test_case {
|
|||
if ( $tinfo->{'big_test'} and ! $::opt_big_test )
|
||||
{
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "Test needs 'big-test' option";
|
||||
$tinfo->{'comment'}= "Test needs --big-test";
|
||||
return $tinfo
|
||||
}
|
||||
if ( $tinfo->{'big_test'} )
|
||||
{
|
||||
# All 'big_test' takes a long time to run
|
||||
$tinfo->{'long_test'}= 1;
|
||||
}
|
||||
|
||||
if ( $tinfo->{'need_debug'} && ! $::debug_compiled_binaries )
|
||||
{
|
||||
|
|
@ -927,7 +943,7 @@ sub collect_one_test_case {
|
|||
{
|
||||
# All ndb test's should be skipped
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "No ndbcluster tests(--skip-ndbcluster)";
|
||||
$tinfo->{'comment'}= "No ndbcluster";
|
||||
return $tinfo;
|
||||
}
|
||||
}
|
||||
|
|
@ -948,7 +964,7 @@ sub collect_one_test_case {
|
|||
if ( $skip_rpl )
|
||||
{
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "No replication tests(--skip-rpl)";
|
||||
$tinfo->{'comment'}= "No replication tests";
|
||||
return $tinfo;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -2407,8 +2407,8 @@ sub remove_stale_vardir () {
|
|||
|
||||
# Remove the var/ dir in mysql-test dir if any
|
||||
# this could be an old symlink that shouldn't be there
|
||||
mtr_verbose("Removing $default_vardir");
|
||||
mtr_rmtree($default_vardir);
|
||||
# mtr_verbose("Removing $default_vardir");
|
||||
# mtr_rmtree($default_vardir);
|
||||
|
||||
# Remove the "var" dir
|
||||
mtr_verbose("Removing $opt_vardir/");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue