From 011cbe9088bdba6a249f795f395b3cbbb9f791dc Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 16 Jul 2011 09:59:15 +0200 Subject: move ctest handling from mtr to a separate suite --- mysql-test/README.suites | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'mysql-test/README.suites') diff --git a/mysql-test/README.suites b/mysql-test/README.suites index de49bef2715..41b38df58b5 100644 --- a/mysql-test/README.suites +++ b/mysql-test/README.suites @@ -51,16 +51,16 @@ with bless {}; - that is it must return an object of that class. It can also return a string - in this case all tests in the suite will be skipped, with this string being printed as a reason. -A suite class can define config_files() and servers() methods. +A suite class can define config_files(), servers(), list_cases(), +and start_test() methods. -A config_files method returns a list of additional config files (besides +A config_files() method returns a list of additional config files (besides my.cnf), that this suite needs to be created. For every file it specifies a function that will create it, when given a My::Config object. For example: - sub config_files { ( 'config.ini' => \&write_ini, - 'new.conf' => \&do_new_conf ) } + sub config_files { ( 'config.ini' => \&write_ini, 'new.conf' => \&do_new ) } -A servers method returns a list of processes that needs to be started for +A servers() method returns a list of processes that needs to be started for this suite. A process is specified as a pair (regex, hash). A regex must match a section in the my.cnf template (for example, qr/mysqld\./ corresponds to all mysqld processes), a hash contains these options: @@ -80,6 +80,15 @@ example: sub servers { ( qr/^foo$/ => { SORT => 200, See sphinx suite for an example. +A list_cases() method returns a complete list of cases for this suite. +By default it will be the list of files that have .test extension, +but without the extension. This list will be filtered by mtr, subject to +different mtr options (--big-test, --start-from, etc), the suite does not have +to do it. + +A start_test() method starts one test process, by default it will be mysqltest. + +See unit suite for an example of list_cases() and start_test() methods. ========================== A suite can have my.cnf template file in the suitedir. A my.cnf template uses a normal my.cnf syntax - groups, options, @@ -149,7 +158,7 @@ names. E.g. RPL_COMBINATIONS=mix:row ./mtr --suite rpl -See innodb_plugin suite for an example of how suite.pm may set this variable +See innodb suite for an example of how suite.pm may set this variable to exclude unsupported configurations. ========================== -- cgit v1.2.1