|
164 | 164 |
|
165 | 165 | # If you add a new suite, please check TEST_DIRS in Makefile.am. |
166 | 166 | # |
167 | | -my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,gis,rpl,innodb,innodb_gis,innodb_fts,innodb_zip,innodb_undo,perfschema,funcs_1,opt_trace,parts,auth_sec,query_rewrite_plugins,gcol,sysschema,test_service_sql_api,xplugin"; |
| 167 | +my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,gis,rpl,innodb,innodb_gis,innodb_fts,innodb_zip,innodb_undo,perfschema,funcs_1,opt_trace,parts,auth_sec,query_rewrite_plugins,gcol,sysschema,test_service_sql_api"; |
168 | 168 | my $opt_suites; |
169 | 169 |
|
170 | 170 | our $opt_verbose= 0; # Verbose output, enable with --verbose |
|
259 | 259 |
|
260 | 260 | my $baseport; |
261 | 261 | my $mysqlx_baseport; |
| 262 | + |
| 263 | +my $opt_mysqlx_baseport = $ENV{'MYSQLXPLUGIN_PORT'} || "auto"; |
262 | 264 | # $opt_build_thread may later be set from $opt_port_base |
263 | 265 | my $opt_build_thread= $ENV{'MTR_BUILD_THREAD'} || "auto"; |
264 | 266 | my $opt_port_base= $ENV{'MTR_PORT_BASE'} || "auto"; |
@@ -432,8 +434,9 @@ sub main { |
432 | 434 | } |
433 | 435 | $ENV{MTR_PARALLEL} = $opt_parallel; |
434 | 436 |
|
435 | | - if ($opt_parallel > 1 && ($opt_start_exit || $opt_stress)) { |
436 | | - mtr_warning("Parallel cannot be used with --start-and-exit or --stress\n" . |
| 437 | + my $is_option_mysqlx_port_set= $opt_mysqlx_baseport ne "auto"; |
| 438 | + if ($opt_parallel > 1 && ($opt_start_exit || $opt_stress || $is_option_mysqlx_port_set)) { |
| 439 | + mtr_warning("Parallel cannot be used neither with --start-and-exit nor --stress nor --mysqlx_port\n" . |
437 | 440 | "Setting parallel to 1"); |
438 | 441 | $opt_parallel= 1; |
439 | 442 | } |
@@ -465,6 +468,7 @@ sub main { |
465 | 468 | # Also read from any plugin local or suite specific plugin.defs |
466 | 469 | for (glob "$basedir/plugin/*/tests/mtr/plugin.defs". |
467 | 470 | " $basedir/internal/plugin/*/tests/mtr/plugin.defs". |
| 471 | + " $basedir/rapid/plugin/*/tests/mtr/plugin.defs". |
468 | 472 | " suite/*/plugin.defs") { |
469 | 473 | read_plugin_defs($_); |
470 | 474 | } |
@@ -1116,8 +1120,9 @@ sub command_line_setup { |
1116 | 1120 | 'skip-im' => \&ignore_option, |
1117 | 1121 |
|
1118 | 1122 | # Specify ports |
1119 | | - 'build-thread|mtr-build-thread=i' => \$opt_build_thread, |
1120 | | - 'port-base|mtr-port-base=i' => \$opt_port_base, |
| 1123 | + 'build-thread|mtr-build-thread=i' => \$opt_build_thread, |
| 1124 | + 'mysqlx-port=i' => \$opt_mysqlx_baseport, |
| 1125 | + 'port-base|mtr-port-base=i' => \$opt_port_base, |
1121 | 1126 |
|
1122 | 1127 | # Test case authoring |
1123 | 1128 | 'record' => \$opt_record, |
@@ -1830,7 +1835,6 @@ sub command_line_setup { |
1830 | 1835 | check_debug_support(\%mysqld_variables); |
1831 | 1836 |
|
1832 | 1837 | executable_setup(); |
1833 | | - |
1834 | 1838 | } |
1835 | 1839 |
|
1836 | 1840 |
|
@@ -1881,8 +1885,12 @@ ($) |
1881 | 1885 |
|
1882 | 1886 | # Calculate baseport |
1883 | 1887 | $baseport= $build_thread * 10 + 10000; |
1884 | | - $mysqlx_baseport = $baseport + 9; |
1885 | | - if ( $baseport < 5001 or $mysqlx_baseport + 9 >= 32767 ) |
| 1888 | + |
| 1889 | + my $should_generate_value= $opt_mysqlx_baseport eq "auto"; |
| 1890 | + |
| 1891 | + $mysqlx_baseport= $should_generate_value ? $baseport + 9 : $opt_mysqlx_baseport; |
| 1892 | + |
| 1893 | + if ( $baseport < 5001 or $baseport + 9 >= 32767) |
1886 | 1894 | { |
1887 | 1895 | mtr_error("MTR_BUILD_THREAD number results in a port", |
1888 | 1896 | "outside 5001 - 32767", |
|
0 commit comments