#At file:///home/bm136801/my/portbase-51/ based on revid:bernhard.ocklin@stripped
2884 Bjorn Munch 2010-01-25
Bug #50182 mtr: allow $MTR_PORT_BASE or --port-base= as alternative to MTR_BUILD_THREAD
As suggested, convert internally to value of build_thread
modified:
mysql-test/mysql-test-run.pl
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2010-01-22 13:12:17 +0000
+++ b/mysql-test/mysql-test-run.pl 2010-01-25 10:20:52 +0000
@@ -191,7 +191,9 @@ our $opt_experimental;
our $experimental_test_cases;
my $baseport;
+# $opt_build_thread may later be set from $opt_port_base
my $opt_build_thread= $ENV{'MTR_BUILD_THREAD'} || "auto";
+my $opt_port_base= $ENV{'MTR_PORT_BASE'} || "auto";
my $build_thread= 0;
my $opt_record;
@@ -838,6 +840,7 @@ sub command_line_setup {
# Specify ports
'build-thread|mtr-build-thread=i' => \$opt_build_thread,
+ 'port-base|mtr-port-base=i' => \$opt_port_base,
# Test case authoring
'record' => \$opt_record,
@@ -1100,6 +1103,16 @@ sub command_line_setup {
$opt_mem= undef;
}
+ if ($opt_port_base ne "auto")
+ {
+ if (my $rem= $opt_port_base % 10)
+ {
+ mtr_warning ("Port base $opt_port_base rounded down to multiple of 10");
+ $opt_port_base-= $rem;
+ }
+ $opt_build_thread= $opt_port_base / 10 - 1000;
+ }
+
# --------------------------------------------------------------------------
# Check if we should speed up tests by trying to run on tmpfs
# --------------------------------------------------------------------------
@@ -5326,6 +5339,11 @@ Options to control what test suites or c
Options that specify ports
+ mtr-port-base=# Base for port numbers, ports from this number to
+ port-base=# number+9 are reserved. Should be divisible by 10;
+ if not it will be rounded down. May be set with
+ environment variable MTR_PORT_BASE. If this value is
+ set and is not "auto", it overrides build-thread.
mtr-build-thread=# Specify unique number to calculate port number(s) from.
build-thread=# Can be set in environment variable MTR_BUILD_THREAD.
Set MTR_BUILD_THREAD="auto" to automatically aquire
Attachment: [text/bzr-bundle] bzr/bjorn.munch@sun.com-20100125102052-otvcuk0buphku2ae.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-mtr branch (Bjorn.Munch:2884) Bug#50182 | Bjorn Munch | 25 Jan |