diff options
author | Philip Stoev <philip.stoev@galeracluster.com> | 2015-03-31 06:43:38 -0700 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-09-09 20:56:41 -0400 |
commit | f8b724db289a540bf4e2d8cba4deceb2e68c9587 (patch) | |
tree | 6bdda840ac2f406452b67c34712919706c299926 /mysql-test/mysql-test-run.pl | |
parent | 9f716ae9d372926eddc4a14e41fab6dc4664417f (diff) | |
download | mariadb-git-f8b724db289a540bf4e2d8cba4deceb2e68c9587.tar.gz |
Galera MTR Tests: Enable the use of --parallel for port-intensive Galera tests by additionally specifying --port-group-size=50
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 1acada98776..60d34ae5e8a 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -363,6 +363,7 @@ my $opt_max_save_datadir= env_or_val(MTR_MAX_SAVE_DATADIR => 20); my $opt_max_test_fail= env_or_val(MTR_MAX_TEST_FAIL => 10); my $opt_parallel= $ENV{MTR_PARALLEL} || 1; +my $opt_port_group_size = $ENV{MTR_PORT_GROUP_SIZE} || 10; # lock file to stop tests my $opt_stop_file= $ENV{MTR_STOP_FILE}; @@ -1147,6 +1148,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, + 'port-group-size=s' => \$opt_port_group_size, # Test case authoring 'record' => \$opt_record, @@ -1838,16 +1840,16 @@ sub set_build_thread_ports($) { $ENV{MTR_BUILD_THREAD}= $build_thread; # Calculate baseport - $baseport= $build_thread * 20 + 10000; - if ( $baseport < 5001 or $baseport + 19 >= 32767 ) + $baseport= $build_thread * $opt_port_group_size + 10000; + if ( $baseport < 5001 or $baseport + $opt_port_group_size >= 32767 ) { mtr_error("MTR_BUILD_THREAD number results in a port", "outside 5001 - 32767", - "($baseport - $baseport + 19)"); + "($baseport - $baseport + $opt_port_group_size)"); } mtr_report("Using MTR_BUILD_THREAD $build_thread,", - "with reserved ports $baseport..".($baseport+19)); + "with reserved ports $baseport..".($baseport+($opt_port_group_size-1))); } @@ -3392,8 +3394,8 @@ sub kill_leftovers ($) { sub check_ports_free ($) { my $bthread= shift; - my $portbase = $bthread * 10 + 10000; - for ($portbase..$portbase+9){ + my $portbase = $bthread * $opt_port_group_size + 10000; + for ($portbase..$portbase+($opt_port_group_size-1)){ if (mtr_ping_port($_)){ mtr_report(" - 'localhost:$_' was not free"); return 0; # One port was not free @@ -6493,6 +6495,8 @@ Options that specify ports build-thread=# Can be set in environment variable MTR_BUILD_THREAD. Set MTR_BUILD_THREAD="auto" to automatically aquire a build thread id that is unique to current host + port-group-size=N Reserve groups of TCP ports of size N for each MTR thread + Options for test case authoring |