Commit 9f4859e7 authored by Luis Soares's avatar Luis Soares

WL#5408: Reduce Pushbuild2 turnaround times for rpl suite.

This patch aims at moving some rpl tests to be run on a daily
basis instead of running on a per push basis. To accomplish such
goal the following modifications are proposed:

- MTR: added --skip-test-list cli parameter

  This option allows the user to specify more than one
  disabled.def file, for example:

  perl mtr --skip-test-list=list1.list --skip-test-list=list2.list

- Added collections/disabled-per-push.list

  This file lists the test cases that should be disabled per
  push.

- Changed mysql-test/collections/default.push

  Added --skip-test-list=collections/disabled-per-push.list
  to rpl_binlog_row, ps_row and n_mix runs.

- Changed mysql-test/collections/default.daily

  Added rpl_binlog_row run (since it is partially run per push we
  should run it fully on a daily basis).
parent 6ac630ea
...@@ -3,3 +3,4 @@ perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collection ...@@ -3,3 +3,4 @@ perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collection
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-emebbed --embedded perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-emebbed --embedded
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1
perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_ndb_row --vardir=var-rpl_ndb_row --mysqld=--binlog-format=row --suite=rpl_ndb,ndb perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_ndb_row --vardir=var-rpl_ndb_row --mysqld=--binlog-format=row --suite=rpl_ndb,ndb
perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --mysqld=--binlog-format=row --suite=rpl,binlog --skip-ndb
perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed --embedded --experimental=collections/default.experimental --skip-ndb perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed --embedded --experimental=collections/default.experimental --skip-ndb
perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental --skip-ndb perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental --skip-ndb
This diff is collapsed.
...@@ -98,10 +98,11 @@ sub init_pattern { ...@@ -98,10 +98,11 @@ sub init_pattern {
# #
############################################################################## ##############################################################################
sub collect_test_cases ($$$) { sub collect_test_cases ($$$$) {
my $opt_reorder= shift; # True if we're reordering tests my $opt_reorder= shift; # True if we're reordering tests
my $suites= shift; # Semicolon separated list of test suites my $suites= shift; # Semicolon separated list of test suites
my $opt_cases= shift; my $opt_cases= shift;
my $opt_skip_test_list= shift;
my $cases= []; # Array of hash(one hash for each testcase) my $cases= []; # Array of hash(one hash for each testcase)
$do_test_reg= init_pattern($do_test, "--do-test"); $do_test_reg= init_pattern($do_test, "--do-test");
...@@ -125,7 +126,7 @@ sub collect_test_cases ($$$) { ...@@ -125,7 +126,7 @@ sub collect_test_cases ($$$) {
{ {
foreach my $suite (split(",", $suites)) 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; last if $some_test_found;
} }
} }
...@@ -250,6 +251,7 @@ sub collect_one_suite($) ...@@ -250,6 +251,7 @@ sub collect_one_suite($)
{ {
my $suite= shift; # Test suite name my $suite= shift; # Test suite name
my $opt_cases= shift; my $opt_cases= shift;
my $opt_skip_test_list= shift;
my @cases; # Array of hash my @cases; # Array of hash
mtr_verbose("Collecting: $suite"); mtr_verbose("Collecting: $suite");
...@@ -311,18 +313,23 @@ sub collect_one_suite($) ...@@ -311,18 +313,23 @@ sub collect_one_suite($)
# Build a hash of disabled testcases for this suite # Build a hash of disabled testcases for this suite
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
my %disabled; my %disabled;
if ( open(DISABLED, "$testdir/disabled.def" ) ) my @disabled_collection= @{$opt_skip_test_list} if defined @{$opt_skip_test_list};
{ unshift (@disabled_collection, "$testdir/disabled.def");
while ( <DISABLED> ) for my $skip (@disabled_collection)
{
if ( open(DISABLED, $skip ) )
{ {
chomp; while ( <DISABLED> )
if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
{ {
$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 # Read suite.opt file
my $suite_opt_file= "$testdir/suite.opt"; my $suite_opt_file= "$testdir/suite.opt";
......
...@@ -165,6 +165,7 @@ our @opt_extra_mysqld_opt; ...@@ -165,6 +165,7 @@ our @opt_extra_mysqld_opt;
my $opt_compress; my $opt_compress;
my $opt_ssl; my $opt_ssl;
my $opt_skip_ssl; my $opt_skip_ssl;
my @opt_skip_test_list;
our $opt_ssl_supported; our $opt_ssl_supported;
my $opt_ps_protocol; my $opt_ps_protocol;
my $opt_sp_protocol; my $opt_sp_protocol;
...@@ -326,7 +327,7 @@ sub main { ...@@ -326,7 +327,7 @@ sub main {
} }
mtr_report("Collecting tests..."); mtr_report("Collecting tests...");
my $tests= collect_test_cases($opt_reorder, $opt_suites, \@opt_cases); my $tests= collect_test_cases($opt_reorder, $opt_suites, \@opt_cases, \@opt_skip_test_list);
if ( $opt_report_features ) { if ( $opt_report_features ) {
# Put "report features" as the first test to run # Put "report features" as the first test to run
...@@ -946,6 +947,7 @@ sub command_line_setup { ...@@ -946,6 +947,7 @@ sub command_line_setup {
'help|h' => \$opt_usage, 'help|h' => \$opt_usage,
'list-options' => \$opt_list_options, 'list-options' => \$opt_list_options,
'skip-test-list=s' => \@opt_skip_test_list
); );
GetOptions(%options) or usage("Can't read options"); GetOptions(%options) or usage("Can't read options");
...@@ -5419,6 +5421,9 @@ Options to control what test suites or cases to run ...@@ -5419,6 +5421,9 @@ Options to control what test suites or cases to run
enable-disabled Run also tests marked as disabled enable-disabled Run also tests marked as disabled
print-testcases Don't run the tests but print details about all the print-testcases Don't run the tests but print details about all the
selected tests, in the order they would be run. selected tests, in the order they would be run.
skip-test-list=FILE Skip the tests listed in FILE. Each line in the file
is an entry and should be formatted as:
<TESTNAME> : <COMMENT>
Options that specify ports Options that specify ports
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment