summaryrefslogtreecommitdiff
path: root/mysql-test/lib
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/lib')
-rw-r--r--mysql-test/lib/My/Config.pm2
-rw-r--r--mysql-test/lib/My/ConfigFactory.pm2
-rw-r--r--mysql-test/lib/My/Options.pm2
-rw-r--r--mysql-test/lib/My/SafeProcess/safe_process.cc2
-rw-r--r--mysql-test/lib/My/SafeProcess/safe_process.pl2
-rw-r--r--mysql-test/lib/My/Test.pm3
-rw-r--r--mysql-test/lib/mtr_cases.pm55
-rw-r--r--mysql-test/lib/mtr_gprof.pl2
-rw-r--r--mysql-test/lib/mtr_process.pl4
9 files changed, 30 insertions, 44 deletions
diff --git a/mysql-test/lib/My/Config.pm b/mysql-test/lib/My/Config.pm
index 23f29b53ff3..1823ed59e02 100644
--- a/mysql-test/lib/My/Config.pm
+++ b/mysql-test/lib/My/Config.pm
@@ -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
diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm
index 1bc9977cf4a..73bad5bd81d 100644
--- a/mysql-test/lib/My/ConfigFactory.pm
+++ b/mysql-test/lib/My/ConfigFactory.pm
@@ -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
diff --git a/mysql-test/lib/My/Options.pm b/mysql-test/lib/My/Options.pm
index 55d1010aad8..ff3992ecb2e 100644
--- a/mysql-test/lib/My/Options.pm
+++ b/mysql-test/lib/My/Options.pm
@@ -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;
}
diff --git a/mysql-test/lib/My/SafeProcess/safe_process.cc b/mysql-test/lib/My/SafeProcess/safe_process.cc
index 2f90b65f62e..ffe11417e7d 100644
--- a/mysql-test/lib/My/SafeProcess/safe_process.cc
+++ b/mysql-test/lib/My/SafeProcess/safe_process.cc
@@ -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
diff --git a/mysql-test/lib/My/SafeProcess/safe_process.pl b/mysql-test/lib/My/SafeProcess/safe_process.pl
index 1b3c0aa9a5f..de844e010a1 100644
--- a/mysql-test/lib/My/SafeProcess/safe_process.pl
+++ b/mysql-test/lib/My/SafeProcess/safe_process.pl
@@ -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
diff --git a/mysql-test/lib/My/Test.pm b/mysql-test/lib/My/Test.pm
index 5b202ea17a1..04dccfdaa4a 100644
--- a/mysql-test/lib/My/Test.pm
+++ b/mysql-test/lib/My/Test.pm
@@ -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;
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index 2d8f111f054..3c8d3059713 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -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)
- {
-
- next if ( $test->{'skip'} );
+ if ( $test->{'skip'} )
+ {
+ push(@new_cases, $test);
+ next;
+ }
- # 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);
- }
}
diff --git a/mysql-test/lib/mtr_gprof.pl b/mysql-test/lib/mtr_gprof.pl
index 15aad17a3d4..34e722a251f 100644
--- a/mysql-test/lib/mtr_gprof.pl
+++ b/mysql-test/lib/mtr_gprof.pl
@@ -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
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl
index cebb895da6e..4bb6be711f0 100644
--- a/mysql-test/lib/mtr_process.pl
+++ b/mysql-test/lib/mtr_process.pl
@@ -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, " .