Commit c0ad2cd8 authored by Sergei Golubchik's avatar Sergei Golubchik

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)
parent abc47248
# Check if ipv6 is available. If not, server is crashing (see BUG#48915). # Check if ipv6 is available.
--disable_query_log #
--disable_abort_on_error # The real test is done in the mysql-test-run.pl
connect (checkcon123456789,::1,root,,test); # (it has to be done *before* mysqld is started)
if($mysql_errno) # This file only signals mysql-test-run.pl that ipv6 support is needed
{ #
skip wrong IP;
}
connection default;
disconnect checkcon123456789;
--enable_abort_on_error
--enable_query_log
# end check
...@@ -25,6 +25,9 @@ connect-timeout= 60 ...@@ -25,6 +25,9 @@ connect-timeout= 60
plugin-dir=@OPT.plugindir plugin-dir=@OPT.plugindir
log-basename=mysqld
disable-sync-sys
log-bin-trust-function-creators=1 log-bin-trust-function-creators=1
key_buffer_size= 1M key_buffer_size= 1M
sort_buffer= 256K sort_buffer= 256K
......
if (`select plugin_library IS NULL from information_schema.plugins where plugin_name LIKE '%archive%'`)
{
--skip archive plugin not available
}
if (`select plugin_library IS NULL from information_schema.plugins where plugin_name LIKE '%blackhole%'`)
{
--skip blackhole plugin not available;
}
if (`select plugin_library IS NULL from information_schema.plugins where plugin_name LIKE '%federated%'`)
{
--skip federated plugin not available
}
...@@ -229,7 +229,6 @@ my @mysqld_rules= ...@@ -229,7 +229,6 @@ my @mysqld_rules=
( (
{ 'basedir' => sub { return shift->{ARGS}->{basedir}; } }, { 'basedir' => sub { return shift->{ARGS}->{basedir}; } },
{ 'tmpdir' => \&fix_tmpdir }, { 'tmpdir' => \&fix_tmpdir },
{ 'log-basename' => sub { return "mysqld" } },
{ 'character-sets-dir' => \&fix_charset_dir }, { 'character-sets-dir' => \&fix_charset_dir },
{ 'lc-messages-dir' => \&fix_language }, { 'lc-messages-dir' => \&fix_language },
{ 'datadir' => \&fix_datadir }, { 'datadir' => \&fix_datadir },
...@@ -237,7 +236,6 @@ my @mysqld_rules= ...@@ -237,7 +236,6 @@ my @mysqld_rules=
{ '#host' => \&fix_host }, { '#host' => \&fix_host },
{ 'port' => \&fix_port }, { 'port' => \&fix_port },
{ 'socket' => \&fix_socket }, { 'socket' => \&fix_socket },
{ 'log-error' => \&fix_log_error },
{ '#log-error' => \&fix_log_error }, { '#log-error' => \&fix_log_error },
{ 'general-log' => sub { return 1; } }, { 'general-log' => sub { return 1; } },
{ 'general-log-file' => \&fix_log }, { 'general-log-file' => \&fix_log },
...@@ -246,7 +244,6 @@ my @mysqld_rules= ...@@ -246,7 +244,6 @@ my @mysqld_rules=
{ '#user' => sub { return shift->{ARGS}->{user} || ""; } }, { '#user' => sub { return shift->{ARGS}->{user} || ""; } },
{ '#password' => sub { return shift->{ARGS}->{password} || ""; } }, { '#password' => sub { return shift->{ARGS}->{password} || ""; } },
{ 'server-id' => \&fix_server_id, }, { 'server-id' => \&fix_server_id, },
{ 'sync-sys' => sub { return 1; } },
# By default, prevent the started mysqld to access files outside of vardir # By default, prevent the started mysqld to access files outside of vardir
{ 'secure-file-priv' => sub { return shift->{ARGS}->{vardir}; } }, { 'secure-file-priv' => sub { return shift->{ARGS}->{vardir}; } },
{ 'ssl-ca' => \&fix_ssl_ca }, { 'ssl-ca' => \&fix_ssl_ca },
......
# -*- cperl -*- # -*- 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 # 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 # it under the terms of the GNU General Public License as published by
...@@ -355,7 +356,12 @@ sub collect_one_suite ...@@ -355,7 +356,12 @@ sub collect_one_suite
my $suite_opts= [ opts_from_file("$testdir/suite.opt") ]; my $suite_opts= [ opts_from_file("$testdir/suite.opt") ];
$suite_opts = [ opts_from_file("$suitedir/suite.opt") ] unless @$suite_opts; $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 ) if ( @$opt_cases )
{ {
...@@ -1044,7 +1050,7 @@ my $tags_map= {'big_test' => ['big_test', 1], ...@@ -1044,7 +1050,7 @@ my $tags_map= {'big_test' => ['big_test', 1],
'not_embedded' => ['not_embedded', 1], 'not_embedded' => ['not_embedded', 1],
'not_valgrind' => ['not_valgrind', 1], 'not_valgrind' => ['not_valgrind', 1],
'have_ssl' => ['need_ssl', 1], 'have_ssl' => ['need_ssl', 1],
'include/check_ipv6.inc' => ['need_ipv6', 1], 'check_ipv6' => ['need_ipv6', 1],
'long_test' => ['long_test', 1], 'long_test' => ['long_test', 1],
}; };
my $tags_regex_string= join('|', keys %$tags_map); my $tags_regex_string= join('|', keys %$tags_map);
...@@ -1065,7 +1071,7 @@ my $file_to_slave_opts= { }; ...@@ -1065,7 +1071,7 @@ my $file_to_slave_opts= { };
sub get_tags_from_file { sub get_tags_from_file {
my ($file, $suitedir)= @_; my ($file, $suitedir)= @_;
return ('', '', '') unless -f $file; return ([], [], []) unless -f $file;
return ($file_to_tags->{$file}, $file_to_master_opts->{$file}, return ($file_to_tags->{$file}, $file_to_master_opts->{$file},
$file_to_slave_opts->{$file}) $file_to_slave_opts->{$file})
......
...@@ -161,8 +161,27 @@ my $path_config_file; # The generated config file, var/my.cnf ...@@ -161,8 +161,27 @@ 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= "main,sys_vars,binlog,federated,rpl,innodb,perfschema,maria,parts,percona,vcol,oqgraph,sphinx,pbxt,unit" . my $DEFAULT_SUITES= join(',', qw(
",handler,optimizer_unfixed_bugs"; 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; my $opt_suites;
our $opt_verbose= 0; # Verbose output, enable with --verbose our $opt_verbose= 0; # Verbose output, enable with --verbose
...@@ -3447,12 +3466,6 @@ sub mysql_install_db { ...@@ -3447,12 +3466,6 @@ sub mysql_install_db {
my $exe_mysqld_bootstrap = my $exe_mysqld_bootstrap =
$ENV{'MYSQLD_BOOTSTRAP'} || find_mysqld($install_basedir); $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> # export MYSQLD_BOOTSTRAP_CMD variable containing <path>/mysqld <args>
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
......
--loose-federated
--plugin-load=$HA_FEDERATEDX_SO
...@@ -6,7 +6,7 @@ package My::Suite::InnoDB; ...@@ -6,7 +6,7 @@ package My::Suite::InnoDB;
my @combinations; my @combinations;
push @combinations, 'innodb_plugin' if $ENV{HA_INNODB_SO}; 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"; push @combinations, 'xtradb' if $::mysqld_variables{'innodb'} eq "ON";
return "Neither innodb_plugin nor xtradb are available" unless @combinations; return "Neither innodb_plugin nor xtradb are available" unless @combinations;
......
package My::Suite::PBXT;
@ISA = qw(My::Suite);
return "No PBXT engine" unless $ENV{HA_PBXT_SO} or $::mysqld_variables{pbxt};
bless { };
...@@ -28,6 +28,7 @@ sub start_test { ...@@ -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"; return "Not configured to run ctest" unless -f "../CTestTestfile.cmake";
my ($ctest_vs)= $opt_vs_config ? "--build-config $opt_vs_config" : ""; my ($ctest_vs)= $opt_vs_config ? "--build-config $opt_vs_config" : "";
my (@ctest_list)= `cd .. && ctest $opt_vs_config --show-only --verbose`; my (@ctest_list)= `cd .. && ctest $opt_vs_config --show-only --verbose`;
......
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