MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:June 3 2009 10:46am
Subject:bzr commit into mysql-5.1-mtr branch (Bjorn.Munch:2802) Bug#45256
View as plain text  
#At file:///home/bm136801/my/autpar-51/

 2802 Bjorn Munch	2009-06-03
      Bug #45256 Enable 'auto' for mtr --parallel
      Let the user specify 'auto' for parallel value
      Also set --parallel=auto in default.push so we can get this tested.
      modified:
        mysql-test/collections/default.push
        mysql-test/mysql-test-run.pl

=== modified file 'mysql-test/collections/default.push'
--- a/mysql-test/collections/default.push	2009-05-28 11:02:03 +0000
+++ b/mysql-test/collections/default.push	2009-06-03 10:46:04 +0000
@@ -1,5 +1,5 @@
-perl mysql-test-run.pl --timer --force --parallel=2 --comment=n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental
-perl mysql-test-run.pl --timer --force --parallel=2 --comment=ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental
-perl mysql-test-run.pl --timer --force --parallel=2 --comment=embedded --embedded --experimental=collections/default.experimental
-perl mysql-test-run.pl --timer --force --parallel=2 --comment=rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental
-perl mysql-test-run.pl --timer --force --parallel=2 --comment=funcs_1 --suite=funcs_1 --experimental=collections/default.experimental
+perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental
+perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental
+perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --embedded --experimental=collections/default.experimental
+perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental
+perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --suite=funcs_1 --experimental=collections/default.experimental

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2009-06-02 08:00:45 +0000
+++ b/mysql-test/mysql-test-run.pl	2009-06-03 10:46:04 +0000
@@ -313,7 +313,7 @@ sub main {
 
   #######################################################################
   my $num_tests= @$tests;
-  if ( not defined $opt_parallel ) {
+  if ( $opt_parallel eq "auto" ) {
     # Try to find a suitable value for number of workers
     my $sys_info= My::SysInfo->new();
 
@@ -795,7 +795,7 @@ sub command_line_setup {
              'vs-config'                => \$opt_vs_config,
 
 	     # Max number of parallel threads to use
-	     'parallel=i'               => \$opt_parallel,
+	     'parallel=s'               => \$opt_parallel,
 
              # Config file to use as template for all tests
 	     'defaults-file=s'          => \&collect_option,
@@ -1135,9 +1135,9 @@ sub command_line_setup {
   # --------------------------------------------------------------------------
   # Check parallel value
   # --------------------------------------------------------------------------
-  if ($opt_parallel < 1)
+  if ($opt_parallel ne "auto" && $opt_parallel < 1)
   {
-    mtr_error("0 or negative parallel value makes no sense, use positive number");
+    mtr_error("0 or negative parallel value makes no sense, use 'auto' or positive number");
   }
 
   # --------------------------------------------------------------------------
@@ -5202,6 +5202,7 @@ Misc options
   fast                  Run as fast as possible, dont't wait for servers
                         to shutdown etc.
   parallel=N            Run tests in N parallel threads (default=1)
+                        Use parallel=auto for auto-setting of N
   repeat=N              Run each test N number of times
   retry=N               Retry tests that fail N times, limit number of failures
                         to $opt_retry_failure

Thread
bzr commit into mysql-5.1-mtr branch (Bjorn.Munch:2802) Bug#45256Bjorn Munch3 Jun