summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Svensson <msvensson@mysql.com>2008-11-10 16:10:49 +0100
committerMagnus Svensson <msvensson@mysql.com>2008-11-10 16:10:49 +0100
commit6be5398f3b5a7b54f89c0520beabc651faa8dd45 (patch)
tree7cae019f49ed25c1ae35b2e7729d057be900931f
parent63891d63d6f0690a7616ffbe47df30dd29ae3782 (diff)
downloadmariadb-git-6be5398f3b5a7b54f89c0520beabc651faa8dd45.tar.gz
WL#4189 Use only one worker for --record
-rwxr-xr-xmysql-test/mysql-test-run.pl15
1 files changed, 11 insertions, 4 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 05534ed9680..415b4f646a1 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -196,6 +196,8 @@ my $opt_max_save_core= $ENV{MTR_MAX_SAVE_CORE} || 5;
my $opt_max_save_datadir= $ENV{MTR_MAX_SAVE_DATADIR} || 20;
my $opt_max_test_fail= $ENV{MTR_MAX_TEST_FAIL} || 10;
+my $opt_parallel= $ENV{MTR_PARALLEL};
+
select(STDOUT);
$| = 1; # Automatically flush STDOUT
@@ -211,10 +213,6 @@ sub main {
# directly before it executes them, like "make test-force-pl" in RPM builds.
mtr_report("Logging: $0 ", join(" ", @ARGV));
- my $opt_parallel= $ENV{MTR_PARALLEL};
- Getopt::Long::Configure("pass_through");
- GetOptions('parallel=i' => \$opt_parallel) or usage(0, "Can't read options");
-
command_line_setup();
if ( $opt_gcov ) {
@@ -712,6 +710,7 @@ sub set_vardir {
}
+
sub command_line_setup {
my $opt_comment;
my $opt_usage;
@@ -731,6 +730,9 @@ sub command_line_setup {
'compress' => \$opt_compress,
'vs-config' => \$opt_vs_config,
+ # Max number of parallel threads to use
+ 'parallel=i' => \$opt_parallel,
+
# Config file to use as template for all tests
'defaults-file=s' => \&collect_option,
# Extra config file to append to all generated configs
@@ -1043,6 +1045,11 @@ sub command_line_setup {
mtr_error("Will not run in record mode without a specific test case");
}
+ if ( $opt_record ) {
+ # Use only one worker with --record
+ $opt_parallel= 1;
+ }
+
# --------------------------------------------------------------------------
# Embedded server flag
# --------------------------------------------------------------------------