Re: [Maria-developers] [Commits] Rev 2898: generalization of mtr to support suite.pm extensions: in http://bazaar.launchpad.net/~maria-captains/maria/5.1/
<serg@askmonty.org> writes:
Hi, Kristian
Would you like to look once again at the mtr patch ?
Sure!
I've removed auto-creation of my.cnf options by mere mentioning, as you found that confusing. Instead I added explicit group OPT, so now sphinx my.cnf would do
[searchd] port=@OPT.port
[ENV] SEARCHD_PORT=@searchd.port
Ah, that looks much better (and should be useful if one needs to assign a port to some option that is not named exactly "port").
=== added file 'mysql-test/README.suites' --- a/mysql-test/README.suites 1970-01-01 00:00:00 +0000 +++ b/mysql-test/README.suites 2010-08-11 08:15:49 +0000 @@ -0,0 +1,129 @@ +These are the assorted notes that will be turned into a manual eventually.
Excellent! Will be very useful to future mtr hackers.
=== modified file 'mysql-test/lib/My/Config.pm' --- a/mysql-test/lib/My/Config.pm 2008-09-05 13:31:09 +0000 +++ b/mysql-test/lib/My/Config.pm 2010-08-11 08:15:49 +0000
+package My::Config::Group::ENV;
+# +# Return value for an option in the group, fail if it does not exist +# +sub value { + my ($self, $option_name)= @_; + my $option= $self->option($option_name); + + if (! defined($option) and $ENV{$option_name}) {
This will prevent an option to be set from an environment variable with the value "0". (Just a remark, I'm not sure if that is a problem or not though.) It's a nice cleanup of mtr, and I'm positively surprised how much cleanup you achieved with how little code changes, thanks! Ok to push. - Kristian.
Hi, Kristian! On Aug 11, Kristian Nielsen wrote:
+ + if (! defined($option) and $ENV{$option_name}) {
This will prevent an option to be set from an environment variable with the value "0". (Just a remark, I'm not sure if that is a problem or not though.)
Fixed, thanks.
It's a nice cleanup of mtr, and I'm positively surprised how much cleanup you achieved with how little code changes, thanks!
Ok to push.
Thanks. I've found one problem with my patch - many tests were skipped (they didn't fail, though) because skip-innodb was applied globally, and not only for tests without have_innodb.inc mtr has a function that reads the test and all included files, recursively, looking for "include/have_innodb.inc" substring and adds "skip-innodb" only if this substring was not found. Also it looks for pbxt, federated, binlog, etc. Fixed as follows: I've made mtr to support -master.opt and -slave.opt (and simply .opt) files not only for the main test file, but for all included files too. So now include/have_innodb.inc has a completent file include/have_innodb.opt with the --loose-innodb option. Same for pbxt, federated, binlog. It gives the same effect as looking for substrings - any test using innodb gets innodb enabled. I'll push into a staging tree asap. Regards, Sergei
participants (2)
-
Kristian Nielsen
-
Sergei Golubchik