From 22c2cdd1a7df362b5929c9c43c4ef27107ef9451 Mon Sep 17 00:00:00 2001 From: "skozlov/ksm@mysql.com/virtop.localdomain" <> Date: Wed, 21 Nov 2007 23:44:31 +0300 Subject: [PATCH] WL#3949, added skip combinations for some conditions --- .../have_binlog_format_row_or_statement.inc | 7 +++++ mysql-test/lib/mtr_cases.pl | 29 ++++++++++--------- mysql-test/mysql-test-run.pl | 3 ++ 3 files changed, 26 insertions(+), 13 deletions(-) create mode 100644 mysql-test/include/have_binlog_format_row_or_statement.inc diff --git a/mysql-test/include/have_binlog_format_row_or_statement.inc b/mysql-test/include/have_binlog_format_row_or_statement.inc new file mode 100644 index 00000000000..c89df82eb80 --- /dev/null +++ b/mysql-test/include/have_binlog_format_row_or_statement.inc @@ -0,0 +1,7 @@ +--source include/have_log_bin.inc + +-- require r/have_binlog_format_statement.require +--disable_query_log +--replace_result ROW STATEMENT +show variables like "binlog_format"; +--enable_query_log diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl index 5f025b63b38..d3f4c532b2f 100644 --- a/mysql-test/lib/mtr_cases.pl +++ b/mysql-test/lib/mtr_cases.pl @@ -229,24 +229,27 @@ sub collect_one_suite($$) my $testdir= "$suitedir/t"; my $resdir= "$suitedir/r"; - if (!@::opt_combination) + if (!defined $::opt_record and !defined $::opt_skip_combination) { - # Read combinations file - if ( open(COMB,$combination_file) ) + if (!@::opt_combination) { - while () + # Read combinations file + if ( open(COMB,$combination_file) ) { - chomp; - s/\ +/ /g; - push (@$combinations, $_) unless ($_ eq ''); + while () + { + chomp; + s/\ +/ /g; + push (@$combinations, $_) unless ($_ eq ''); + } + close COMB; } - close COMB; } - } - else - { - # take the combination from command-line - @$combinations = @::opt_combination; + else + { + # take the combination from command-line + @$combinations = @::opt_combination; + } } # Remember last element position my $begin_index = $#{@$cases} + 1; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index bb520bdf617..e17bbeb251f 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -165,6 +165,7 @@ our $opt_small_bench= 0; our $opt_big_test= 0; our @opt_combination; +our $opt_skip_combination; our @opt_extra_mysqld_opt; @@ -532,6 +533,7 @@ sub command_line_setup () { 'skip-test=s' => \$opt_skip_test, 'big-test' => \$opt_big_test, 'combination=s' => \@opt_combination, + 'skip-combination' => \$opt_skip_combination, # Specify ports 'master_port=i' => \$opt_master_myport, @@ -5179,6 +5181,7 @@ Options to control what test suites or cases to run checked from test cases. combination="ARG1 .. ARG2" Specify a set of "mysqld" arguments for one combination. + skip-combination Skip any combination options and combinations files Options that specify ports