Commit c2839e2c authored by Sergei Golubchik's avatar Sergei Golubchik

mysql-test: allow suite.pm add its suite to the default list.

run tokudb suites by default.
mark big and slow tests tokudb.change_column_all_1000_1 and
tokudb.change_column_all_1000_10 test as --big
parent 5e812ee0
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
package My::Suite; package My::Suite;
sub is_default { 0 }
sub config_files { () } sub config_files { () }
sub servers { () } sub servers { () }
sub skip_combinations { () } sub skip_combinations { () }
......
...@@ -23,7 +23,7 @@ package mtr_cases; ...@@ -23,7 +23,7 @@ package mtr_cases;
use strict; use strict;
use base qw(Exporter); use base qw(Exporter);
our @EXPORT= qw(collect_option collect_test_cases); our @EXPORT= qw(collect_option collect_test_cases collect_default_suites);
use Carp; use Carp;
...@@ -315,11 +315,33 @@ sub parse_disabled { ...@@ -315,11 +315,33 @@ sub parse_disabled {
} }
} }
#
# load suite.pm files from plugin suites
# collect the list of default plugin suites.
#
sub collect_default_suites(@)
{
my @dirs = my_find_dir(dirname($::glob_mysql_test_dir),
['storage/*/mysql-test/*', 'plugin/*/mysql-test/*'],
[], NOT_REQUIRED);
for my $d (@dirs) {
next unless -f "$d/suite.pm";
my $sname= basename($d);
# ignore overlays here, otherwise we'd need accurate
# duplicate detection with overlay support for the default suite list
next if $sname eq 'main' or -d "$::glob_mysql_test_dir/suite/$sname";
my $s = load_suite_object($sname, $d);
push @_, $sname if $s->is_default();
}
return @_;
}
# #
# processes one user-specified suite name. # processes one user-specified suite name.
# it could contain wildcards, e.g engines/* # it could contain wildcards, e.g engines/*
# #
sub collect_suite_name sub collect_suite_name($$)
{ {
my $suitename= shift; # Test suite name my $suitename= shift; # Test suite name
my $opt_cases= shift; my $opt_cases= shift;
......
...@@ -162,30 +162,30 @@ my $path_config_file; # The generated config file, var/my.cnf ...@@ -162,30 +162,30 @@ my $path_config_file; # The generated config file, var/my.cnf
# executables will be used by the test suite. # executables will be used by the test suite.
our $opt_vs_config = $ENV{'MTR_VS_CONFIG'}; our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
my $DEFAULT_SUITES= join(',', map { "$_-" } qw( my @DEFAULT_SUITES= qw(
main main-
archive archive-
binlog binlog-
csv csv-
federated federated-
funcs_1 funcs_1-
funcs_2 funcs_2-
handler handler-
heap heap-
innodb innodb-
maria maria-
optimizer_unfixed_bugs optimizer_unfixed_bugs-
oqgraph oqgraph-
parts parts-
percona percona-
perfschema perfschema-
plugins plugins-
rpl rpl-
sphinx sphinx-
sys_vars sys_vars-
unit unit-
vcol vcol-
)); );
my $opt_suites; my $opt_suites;
our $opt_verbose= 0; # Verbose output, enable with --verbose our $opt_verbose= 0; # Verbose output, enable with --verbose
...@@ -384,11 +384,6 @@ sub main { ...@@ -384,11 +384,6 @@ sub main {
} }
if (!$opt_suites) {
$opt_suites= $DEFAULT_SUITES;
}
mtr_report("Using suites: $opt_suites") unless @opt_cases;
print "vardir: $opt_vardir\n"; print "vardir: $opt_vardir\n";
initialize_servers(); initialize_servers();
init_timers(); init_timers();
...@@ -397,6 +392,11 @@ sub main { ...@@ -397,6 +392,11 @@ sub main {
executable_setup(); executable_setup();
if (!$opt_suites) {
$opt_suites= join ',', collect_default_suites(@DEFAULT_SUITES);
}
mtr_report("Using suites: $opt_suites") unless @opt_cases;
# --debug[-common] implies we run debug server # --debug[-common] implies we run debug server
$opt_debug_server= 1 if $opt_debug || $opt_debug_common; $opt_debug_server= 1 if $opt_debug || $opt_debug_common;
...@@ -2940,7 +2940,7 @@ sub check_ndbcluster_support { ...@@ -2940,7 +2940,7 @@ sub check_ndbcluster_support {
mtr_report(" - enabling ndbcluster"); mtr_report(" - enabling ndbcluster");
$ndbcluster_enabled= 1; $ndbcluster_enabled= 1;
# Add MySQL Cluster test suites # Add MySQL Cluster test suites
$DEFAULT_SUITES.=",ndb,ndb_binlog,rpl_ndb,ndb_rpl,ndb_memcache"; push @DEFAULT_SUITES, qw(ndb ndb_binlog rpl_ndb ndb_rpl ndb_memcache);
return; return;
} }
...@@ -6307,6 +6307,8 @@ sub usage ($) { ...@@ -6307,6 +6307,8 @@ sub usage ($) {
exit; exit;
} }
local $"= ','; # for @DEFAULT_SUITES below
print <<HERE; print <<HERE;
$0 [ OPTIONS ] [ TESTCASE ] $0 [ OPTIONS ] [ TESTCASE ]
...@@ -6372,7 +6374,7 @@ Options to control what test suites or cases to run ...@@ -6372,7 +6374,7 @@ Options to control what test suites or cases to run
suite[s]=NAME1,..,NAMEN suite[s]=NAME1,..,NAMEN
Collect tests in suites from the comma separated Collect tests in suites from the comma separated
list of suite names. list of suite names.
The default is: "$DEFAULT_SUITES" The default is: "@DEFAULT_SUITES"
skip-rpl Skip the replication test cases. skip-rpl Skip the replication test cases.
big-test Also run tests marked as "big". Repeat this option big-test Also run tests marked as "big". Repeat this option
twice to run only "big" tests. twice to run only "big" tests.
......
...@@ -7,5 +7,8 @@ $ENV{TOKU_HUGE_PAGES_OK}=1; ...@@ -7,5 +7,8 @@ $ENV{TOKU_HUGE_PAGES_OK}=1;
#return "Not run for embedded server" if $::opt_embedded_server; #return "Not run for embedded server" if $::opt_embedded_server;
return "No TokuDB engine" unless $ENV{HA_TOKUDB_SO} or $::mysqld_variables{tokudb}; return "No TokuDB engine" unless $ENV{HA_TOKUDB_SO} or $::mysqld_variables{tokudb};
sub is_default { 1 }
bless { }; bless { };
# generated from change_column_all.py # generated from change_column_all.py
# test random column change on wide tables # test random column change on wide tables
--source include/big_test.inc
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t, ti; DROP TABLE IF EXISTS t, ti;
--enable_warnings --enable_warnings
# generated from change_all.py # generated from change_all.py
# test random column change on wide tables # test random column change on wide tables
--source include/big_test.inc
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t, ti; DROP TABLE IF EXISTS t, ti;
--enable_warnings --enable_warnings
...@@ -4,5 +4,8 @@ use File::Basename; ...@@ -4,5 +4,8 @@ use File::Basename;
#return "Not run for embedded server" if $::opt_embedded_server; #return "Not run for embedded server" if $::opt_embedded_server;
return "No TokuDB engine" unless $ENV{HA_TOKUDB_SO} or $::mysqld_variables{tokudb}; return "No TokuDB engine" unless $ENV{HA_TOKUDB_SO} or $::mysqld_variables{tokudb};
sub is_default { 1 }
bless { }; bless { };
...@@ -4,5 +4,8 @@ use File::Basename; ...@@ -4,5 +4,8 @@ use File::Basename;
#return "Not run for embedded server" if $::opt_embedded_server; #return "Not run for embedded server" if $::opt_embedded_server;
return "No TokuDB engine" unless $ENV{HA_TOKUDB_SO} or $::mysqld_variables{tokudb}; return "No TokuDB engine" unless $ENV{HA_TOKUDB_SO} or $::mysqld_variables{tokudb};
sub is_default { 1 }
bless { }; bless { };
...@@ -4,5 +4,8 @@ use File::Basename; ...@@ -4,5 +4,8 @@ use File::Basename;
#return "Not run for embedded server" if $::opt_embedded_server; #return "Not run for embedded server" if $::opt_embedded_server;
return "No TokuDB engine" unless $ENV{HA_TOKUDB_SO} or $::mysqld_variables{tokudb}; return "No TokuDB engine" unless $ENV{HA_TOKUDB_SO} or $::mysqld_variables{tokudb};
sub is_default { 1 }
bless { }; bless { };
...@@ -4,5 +4,8 @@ use File::Basename; ...@@ -4,5 +4,8 @@ use File::Basename;
#return "Not run for embedded server" if $::opt_embedded_server; #return "Not run for embedded server" if $::opt_embedded_server;
return "No TokuDB engine" unless $ENV{HA_TOKUDB_SO} or $::mysqld_variables{tokudb}; return "No TokuDB engine" unless $ENV{HA_TOKUDB_SO} or $::mysqld_variables{tokudb};
sub is_default { 1 }
bless { }; bless { };
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