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 @@
package My::Suite;
sub is_default { 0 }
sub config_files { () }
sub servers { () }
sub skip_combinations { () }
......
......@@ -23,7 +23,7 @@ package mtr_cases;
use strict;
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;
......@@ -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.
# it could contain wildcards, e.g engines/*
#
sub collect_suite_name
sub collect_suite_name($$)
{
my $suitename= shift; # Test suite name
my $opt_cases= shift;
......
......@@ -162,30 +162,30 @@ my $path_config_file; # The generated config file, var/my.cnf
# executables will be used by the test suite.
our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
my $DEFAULT_SUITES= join(',', map { "$_-" } qw(
main
archive
binlog
csv
federated
funcs_1
funcs_2
handler
heap
innodb
maria
optimizer_unfixed_bugs
oqgraph
parts
percona
perfschema
plugins
rpl
sphinx
sys_vars
unit
vcol
));
my @DEFAULT_SUITES= qw(
main-
archive-
binlog-
csv-
federated-
funcs_1-
funcs_2-
handler-
heap-
innodb-
maria-
optimizer_unfixed_bugs-
oqgraph-
parts-
percona-
perfschema-
plugins-
rpl-
sphinx-
sys_vars-
unit-
vcol-
);
my $opt_suites;
our $opt_verbose= 0; # Verbose output, enable with --verbose
......@@ -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";
initialize_servers();
init_timers();
......@@ -397,6 +392,11 @@ sub main {
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
$opt_debug_server= 1 if $opt_debug || $opt_debug_common;
......@@ -2940,7 +2940,7 @@ sub check_ndbcluster_support {
mtr_report(" - enabling ndbcluster");
$ndbcluster_enabled= 1;
# 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;
}
......@@ -6307,6 +6307,8 @@ sub usage ($) {
exit;
}
local $"= ','; # for @DEFAULT_SUITES below
print <<HERE;
$0 [ OPTIONS ] [ TESTCASE ]
......@@ -6372,7 +6374,7 @@ Options to control what test suites or cases to run
suite[s]=NAME1,..,NAMEN
Collect tests in suites from the comma separated
list of suite names.
The default is: "$DEFAULT_SUITES"
The default is: "@DEFAULT_SUITES"
skip-rpl Skip the replication test cases.
big-test Also run tests marked as "big". Repeat this option
twice to run only "big" tests.
......
......@@ -7,5 +7,8 @@ $ENV{TOKU_HUGE_PAGES_OK}=1;
#return "Not run for embedded server" if $::opt_embedded_server;
return "No TokuDB engine" unless $ENV{HA_TOKUDB_SO} or $::mysqld_variables{tokudb};
sub is_default { 1 }
bless { };
# generated from change_column_all.py
# test random column change on wide tables
--source include/big_test.inc
--disable_warnings
DROP TABLE IF EXISTS t, ti;
--enable_warnings
# generated from change_all.py
# test random column change on wide tables
--source include/big_test.inc
--disable_warnings
DROP TABLE IF EXISTS t, ti;
--enable_warnings
......@@ -4,5 +4,8 @@ use File::Basename;
#return "Not run for embedded server" if $::opt_embedded_server;
return "No TokuDB engine" unless $ENV{HA_TOKUDB_SO} or $::mysqld_variables{tokudb};
sub is_default { 1 }
bless { };
......@@ -4,5 +4,8 @@ use File::Basename;
#return "Not run for embedded server" if $::opt_embedded_server;
return "No TokuDB engine" unless $ENV{HA_TOKUDB_SO} or $::mysqld_variables{tokudb};
sub is_default { 1 }
bless { };
......@@ -4,5 +4,8 @@ use File::Basename;
#return "Not run for embedded server" if $::opt_embedded_server;
return "No TokuDB engine" unless $ENV{HA_TOKUDB_SO} or $::mysqld_variables{tokudb};
sub is_default { 1 }
bless { };
......@@ -4,5 +4,8 @@ use File::Basename;
#return "Not run for embedded server" if $::opt_embedded_server;
return "No TokuDB engine" unless $ENV{HA_TOKUDB_SO} or $::mysqld_variables{tokudb};
sub is_default { 1 }
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