mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
5.3 merge
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2007, 2010, Oracle and/or its affiliates
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2007, 2011, Oracle and/or its affiliates
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
|
@ -150,7 +150,7 @@ sub is_set {
|
||||
foreach my $set_opt (@$set_opts){
|
||||
my ($opt_name2, $value2)= _split_option($set_opt);
|
||||
|
||||
if ($opt_name1 eq $opt_name2){
|
||||
if ($opt_name1 eq $opt_name2 and $value1 eq $value2){
|
||||
# Option already set
|
||||
return 1;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2008, 2011, Oracle and/or its affiliates
|
||||
|
||||
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
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2007, 2011, Oracle and/or its affiliates
|
||||
#
|
||||
# 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
|
||||
|
@ -97,7 +97,8 @@ sub read_test {
|
||||
chomp($serialized);
|
||||
$serialized =~ s/\\([0-9a-fA-F]{2})/chr(hex($1))/eg;
|
||||
my $test= Storable::thaw($serialized);
|
||||
die "wrong class (hack attempt?): ".ref($test)
|
||||
use Data::Dumper;
|
||||
die "wrong class (hack attempt?): ".ref($test)."\n".Dumper(\$test)
|
||||
unless ref($test) eq 'My::Test';
|
||||
resfile_from_test($test) if $::opt_resfile;
|
||||
return $test;
|
||||
|
@ -470,20 +470,32 @@ sub collect_one_suite
|
||||
#print_testcases(@cases);
|
||||
|
||||
my @new_cases;
|
||||
foreach my $comb (@combinations)
|
||||
TEST: foreach my $test (@cases)
|
||||
{
|
||||
foreach my $test (@cases)
|
||||
{
|
||||
if ( $test->{'skip'} )
|
||||
{
|
||||
push(@new_cases, $test);
|
||||
next;
|
||||
}
|
||||
|
||||
next if ( $test->{'skip'} );
|
||||
|
||||
# Skip this combination if the values it provides
|
||||
# already are set in master_opt or slave_opt
|
||||
foreach my $comb (@combinations)
|
||||
{
|
||||
# Skip all other combinations if the values they change
|
||||
# are already fixed in master_opt or slave_opt
|
||||
if (My::Options::is_set($test->{master_opt}, $comb->{comb_opt}) &&
|
||||
My::Options::is_set($test->{slave_opt}, $comb->{comb_opt}) ){
|
||||
next;
|
||||
}
|
||||
|
||||
# Add combination name short name
|
||||
$test->{combination}= $comb->{name};
|
||||
|
||||
# Add the test to new test cases list
|
||||
push(@new_cases, $test);
|
||||
next TEST;
|
||||
}
|
||||
}
|
||||
|
||||
foreach my $comb (@combinations)
|
||||
{
|
||||
# Copy test options
|
||||
my $new_test= My::Test->new();
|
||||
while (my ($key, $value) = each(%$test)) {
|
||||
@ -506,17 +518,6 @@ sub collect_one_suite
|
||||
}
|
||||
}
|
||||
|
||||
# Add the plain test if it was not already added
|
||||
# as part of a combination
|
||||
my %added;
|
||||
foreach my $new_test (@new_cases){
|
||||
$added{$new_test->{name}}= 1;
|
||||
}
|
||||
foreach my $test (@cases){
|
||||
push(@new_cases, $test) unless $added{$test->{name}};
|
||||
}
|
||||
|
||||
|
||||
#print_testcases(@new_cases);
|
||||
@cases= @new_cases;
|
||||
#print_testcases(@cases);
|
||||
@ -643,9 +644,6 @@ sub process_opts {
|
||||
my @opts= @{$tinfo->{$opt_name}};
|
||||
$tinfo->{$opt_name} = [];
|
||||
|
||||
my @plugins;
|
||||
my %seen;
|
||||
|
||||
foreach my $opt (@opts)
|
||||
{
|
||||
my $value;
|
||||
@ -661,14 +659,6 @@ sub process_opts {
|
||||
next;
|
||||
}
|
||||
|
||||
$value= mtr_match_prefix($opt, "--plugin-load=");
|
||||
if (defined $value)
|
||||
{
|
||||
push @plugins, $value unless $seen{$value};
|
||||
$seen{$value}=1;
|
||||
next;
|
||||
}
|
||||
|
||||
$value= mtr_match_prefix($opt, "--result-file=");
|
||||
if ( defined $value )
|
||||
{
|
||||
@ -715,11 +705,6 @@ sub process_opts {
|
||||
# Ok, this was a real option, add it
|
||||
push(@{$tinfo->{$opt_name}}, $opt);
|
||||
}
|
||||
|
||||
if (@plugins) {
|
||||
my $sep = (IS_WINDOWS) ? ';' : ':';
|
||||
push @{$tinfo->{$opt_name}}, "--plugin-load=" . join($sep, @plugins);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2004, 2011, Oracle and/or its affiliates
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2004, 2010, Oracle and/or its affiliates
|
||||
#
|
||||
# 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
|
||||
@ -130,7 +130,7 @@ sub sleep_until_file_created ($$$$) {
|
||||
mtr_debug("Sleep $sleeptime milliseconds waiting for $pidfile");
|
||||
|
||||
# Print extra message every $warn_seconds seconds
|
||||
if ( $seconds > 1 && $seconds % $warn_seconds == 0 && $seconds < $timeout )
|
||||
if ( $seconds > 1 && ($seconds*10) % ($warn_seconds*10) == 0 && $seconds < $timeout )
|
||||
{
|
||||
my $left= $timeout - $seconds;
|
||||
mtr_warning("Waited $seconds seconds for $pidfile to be created, " .
|
||||
|
Reference in New Issue
Block a user