summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-10-19 23:01:15 +0200
committerSergei Golubchik <sergii@pisem.net>2011-10-19 23:01:15 +0200
commitb3223453f7e4398ff0f55471ac7dc4aecf2caf8d (patch)
treec3bfbe464cd01af9acfe181c24569f1e97b351c7
parent91ef5f2a86684a3afbb5b1f9a1db8d7a687aa871 (diff)
downloadmariadb-git-b3223453f7e4398ff0f55471ac7dc4aecf2caf8d.tar.gz
post-merge changes to the mysql-test suite
mysql-test/include/check_ipv6.inc: don't try to connect to ipv6 address - the server isn't necessarily listening (e.g. a master doesn't, but a slave does. or vice versa) mysql-test/include/default_mysqld.cnf: move hard-coded values from ConfigFactory.pm to a template. really disable syncs mysql-test/include/have_archive_plugin.inc: wrong test. plugin is loaded in the test, it cannot be available before it mysql-test/include/have_blackhole_plugin.inc: wrong test. plugin is loaded in the test, it cannot be available before it mysql-test/include/have_federated_plugin.inc: wrong test. plugin is loaded in the test, it cannot be available before it mysql-test/lib/My/ConfigFactory.pm: move hard-coded values from ConfigFactory.pm to a template. really disable syncs mysql-test/mysql-test-run.pl: formatting mysql-test/suite/funcs_1/t/is_engines_federated.opt: federated can be a plugin mysql-test/suite/innodb/suite.pm: don't load xtradb plugin in embedded server - it lacks some symbols that xtradb needs mysql-test/suite/unit/suite.pm: don't run unit tests in --embedded-server (for simplicity and speed)
-rw-r--r--mysql-test/include/check_ipv6.inc20
-rw-r--r--mysql-test/include/default_mysqld.cnf3
-rw-r--r--mysql-test/include/have_archive_plugin.inc4
-rw-r--r--mysql-test/include/have_blackhole_plugin.inc4
-rw-r--r--mysql-test/include/have_federated_plugin.inc5
-rw-r--r--mysql-test/lib/My/ConfigFactory.pm3
-rw-r--r--mysql-test/lib/mtr_cases.pm14
-rwxr-xr-xmysql-test/mysql-test-run.pl29
-rw-r--r--mysql-test/suite/funcs_1/t/is_engines_federated.opt2
-rw-r--r--mysql-test/suite/innodb/suite.pm2
-rw-r--r--mysql-test/suite/pbxt/suite.pm4
-rw-r--r--mysql-test/suite/unit/suite.pm1
12 files changed, 48 insertions, 43 deletions
diff --git a/mysql-test/include/check_ipv6.inc b/mysql-test/include/check_ipv6.inc
index 14d04b11e83..f9a61f1661e 100644
--- a/mysql-test/include/check_ipv6.inc
+++ b/mysql-test/include/check_ipv6.inc
@@ -1,14 +1,6 @@
-# Check if ipv6 is available. If not, server is crashing (see BUG#48915).
---disable_query_log
---disable_abort_on_error
-connect (checkcon123456789,::1,root,,test);
-if($mysql_errno)
-{
-skip wrong IP;
-}
-connection default;
-disconnect checkcon123456789;
---enable_abort_on_error
---enable_query_log
-# end check
-
+# Check if ipv6 is available.
+#
+# The real test is done in the mysql-test-run.pl
+# (it has to be done *before* mysqld is started)
+# This file only signals mysql-test-run.pl that ipv6 support is needed
+#
diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf
index c5950b3d490..3a8c4c100f2 100644
--- a/mysql-test/include/default_mysqld.cnf
+++ b/mysql-test/include/default_mysqld.cnf
@@ -25,6 +25,9 @@ connect-timeout= 60
plugin-dir=@OPT.plugindir
+log-basename=mysqld
+disable-sync-sys
+
log-bin-trust-function-creators=1
key_buffer_size= 1M
sort_buffer= 256K
diff --git a/mysql-test/include/have_archive_plugin.inc b/mysql-test/include/have_archive_plugin.inc
deleted file mode 100644
index 566e2c49211..00000000000
--- a/mysql-test/include/have_archive_plugin.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-if (`select plugin_library IS NULL from information_schema.plugins where plugin_name LIKE '%archive%'`)
-{
- --skip archive plugin not available
-}
diff --git a/mysql-test/include/have_blackhole_plugin.inc b/mysql-test/include/have_blackhole_plugin.inc
deleted file mode 100644
index b5a3aa2c342..00000000000
--- a/mysql-test/include/have_blackhole_plugin.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-if (`select plugin_library IS NULL from information_schema.plugins where plugin_name LIKE '%blackhole%'`)
-{
- --skip blackhole plugin not available;
-}
diff --git a/mysql-test/include/have_federated_plugin.inc b/mysql-test/include/have_federated_plugin.inc
deleted file mode 100644
index 5c7549de53f..00000000000
--- a/mysql-test/include/have_federated_plugin.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-if (`select plugin_library IS NULL from information_schema.plugins where plugin_name LIKE '%federated%'`)
-{
- --skip federated plugin not available
-}
-
diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm
index 87741e7bf82..02fd556a047 100644
--- a/mysql-test/lib/My/ConfigFactory.pm
+++ b/mysql-test/lib/My/ConfigFactory.pm
@@ -229,7 +229,6 @@ my @mysqld_rules=
(
{ 'basedir' => sub { return shift->{ARGS}->{basedir}; } },
{ 'tmpdir' => \&fix_tmpdir },
- { 'log-basename' => sub { return "mysqld" } },
{ 'character-sets-dir' => \&fix_charset_dir },
{ 'lc-messages-dir' => \&fix_language },
{ 'datadir' => \&fix_datadir },
@@ -237,7 +236,6 @@ my @mysqld_rules=
{ '#host' => \&fix_host },
{ 'port' => \&fix_port },
{ 'socket' => \&fix_socket },
- { 'log-error' => \&fix_log_error },
{ '#log-error' => \&fix_log_error },
{ 'general-log' => sub { return 1; } },
{ 'general-log-file' => \&fix_log },
@@ -246,7 +244,6 @@ my @mysqld_rules=
{ '#user' => sub { return shift->{ARGS}->{user} || ""; } },
{ '#password' => sub { return shift->{ARGS}->{password} || ""; } },
{ 'server-id' => \&fix_server_id, },
- { 'sync-sys' => sub { return 1; } },
# By default, prevent the started mysqld to access files outside of vardir
{ 'secure-file-priv' => sub { return shift->{ARGS}->{vardir}; } },
{ 'ssl-ca' => \&fix_ssl_ca },
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index 5606561d87e..bf85bd91047 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -1,5 +1,6 @@
# -*- cperl -*-
-# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2011, Oracle and/or its affiliates.
+# Copyright (c) 2010, 2011 Monty Program Ab
#
# 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
@@ -355,7 +356,12 @@ sub collect_one_suite
my $suite_opts= [ opts_from_file("$testdir/suite.opt") ];
$suite_opts = [ opts_from_file("$suitedir/suite.opt") ] unless @$suite_opts;
- my (@case_names)= $::suites{$suite}->list_cases($testdir);
+ my @case_names;
+ {
+ my $s= $::suites{$suite};
+ $s = 'My::Suite' unless ref $s;
+ @case_names= $s->list_cases($testdir);
+ }
if ( @$opt_cases )
{
@@ -1044,7 +1050,7 @@ my $tags_map= {'big_test' => ['big_test', 1],
'not_embedded' => ['not_embedded', 1],
'not_valgrind' => ['not_valgrind', 1],
'have_ssl' => ['need_ssl', 1],
- 'include/check_ipv6.inc' => ['need_ipv6', 1],
+ 'check_ipv6' => ['need_ipv6', 1],
'long_test' => ['long_test', 1],
};
my $tags_regex_string= join('|', keys %$tags_map);
@@ -1065,7 +1071,7 @@ my $file_to_slave_opts= { };
sub get_tags_from_file {
my ($file, $suitedir)= @_;
- return ('', '', '') unless -f $file;
+ return ([], [], []) unless -f $file;
return ($file_to_tags->{$file}, $file_to_master_opts->{$file},
$file_to_slave_opts->{$file})
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 4ff8a2208cc..597c78ca9a9 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -161,8 +161,27 @@ 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= "main,sys_vars,binlog,federated,rpl,innodb,perfschema,maria,parts,percona,vcol,oqgraph,sphinx,pbxt,unit" .
- ",handler,optimizer_unfixed_bugs";
+my $DEFAULT_SUITES= join(',', qw(
+ main
+ binlog
+ federated
+ funcs_1
+ funcs_2
+ handler
+ innodb
+ maria
+ optimizer_unfixed_bugs
+ oqgraph
+ parts
+ pbxt
+ percona
+ perfschema
+ rpl
+ sphinx
+ sys_vars
+ unit
+ vcol
+ ));
my $opt_suites;
our $opt_verbose= 0; # Verbose output, enable with --verbose
@@ -3447,12 +3466,6 @@ sub mysql_install_db {
my $exe_mysqld_bootstrap =
$ENV{'MYSQLD_BOOTSTRAP'} || find_mysqld($install_basedir);
- # MASV add only to bootstrap.test
- # Setup args for bootstrap.test
- #
- #mtr_init_args(\$cmd_args);
- #mtr_add_arg($cmd_args, "--loose-skip-aria")
-
# ----------------------------------------------------------------------
# export MYSQLD_BOOTSTRAP_CMD variable containing <path>/mysqld <args>
# ----------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/t/is_engines_federated.opt b/mysql-test/suite/funcs_1/t/is_engines_federated.opt
new file mode 100644
index 00000000000..e3c507f518d
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_engines_federated.opt
@@ -0,0 +1,2 @@
+--loose-federated
+--plugin-load=$HA_FEDERATEDX_SO
diff --git a/mysql-test/suite/innodb/suite.pm b/mysql-test/suite/innodb/suite.pm
index 9accba5b8a1..8eccaeca019 100644
--- a/mysql-test/suite/innodb/suite.pm
+++ b/mysql-test/suite/innodb/suite.pm
@@ -6,7 +6,7 @@ package My::Suite::InnoDB;
my @combinations;
push @combinations, 'innodb_plugin' if $ENV{HA_INNODB_SO};
-push @combinations, 'xtradb_plugin' if $ENV{HA_XTRADB_SO};
+push @combinations, 'xtradb_plugin' if $ENV{HA_XTRADB_SO} and not $::opt_embedded_server;
push @combinations, 'xtradb' if $::mysqld_variables{'innodb'} eq "ON";
return "Neither innodb_plugin nor xtradb are available" unless @combinations;
diff --git a/mysql-test/suite/pbxt/suite.pm b/mysql-test/suite/pbxt/suite.pm
new file mode 100644
index 00000000000..b966caa8e86
--- /dev/null
+++ b/mysql-test/suite/pbxt/suite.pm
@@ -0,0 +1,4 @@
+package My::Suite::PBXT;
+@ISA = qw(My::Suite);
+return "No PBXT engine" unless $ENV{HA_PBXT_SO} or $::mysqld_variables{pbxt};
+bless { };
diff --git a/mysql-test/suite/unit/suite.pm b/mysql-test/suite/unit/suite.pm
index 7d843200ad1..78d82ccb31d 100644
--- a/mysql-test/suite/unit/suite.pm
+++ b/mysql-test/suite/unit/suite.pm
@@ -28,6 +28,7 @@ sub start_test {
}
{
+ return "Not run for embedded server" if $::opt_embedded_server;
return "Not configured to run ctest" unless -f "../CTestTestfile.cmake";
my ($ctest_vs)= $opt_vs_config ? "--build-config $opt_vs_config" : "";
my (@ctest_list)= `cd .. && ctest $opt_vs_config --show-only --verbose`;