Skip to content

Commit 3e6cbcf

Browse files
author
Pavan Naik
committed
BUG#26121192 : --NO-CONSOLE IS COMPULSORY IF --LOG-ERROR USED TO MAKE
WINDOWS RUN PASS Issue: ------ MTR adds '--console' option if '--no-console' options is not specified. But adding '--console' option when '--log-error' is specified either in test-[master/slave].opt or in the config file will cause the test run to fail on windows. Fix: ---- On windows, don't add '--console' option if '--log-error' is specified either in test-[master/slave].opt or in the test config file. This patch is a back-port of bug#20341933. Reviewed-by: Deepa Dixit <deepa.dixit@oracle.com> RB: 16372
1 parent 5f751e2 commit 3e6cbcf

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

mysql-test/mysql-test-run.pl

+15-2
Original file line numberDiff line numberDiff line change
@@ -5201,13 +5201,26 @@ ($$$)
52015201
my $found_skip_core= 0;
52025202
my $found_no_console= 0;
52035203
my $found_log_error= 0;
5204+
5205+
# On windows, do not add console if log-error found in .cnf file
5206+
open (CONFIG_FILE, " < $path_config_file") or
5207+
die("Could not open output file $path_config_file");
5208+
5209+
while (<CONFIG_FILE>)
5210+
{
5211+
if (m/^log[-_]error/)
5212+
{
5213+
$found_log_error= 1;
5214+
}
5215+
}
5216+
close (CONFIG_FILE);
5217+
52045218
foreach my $arg ( @$extra_opts )
52055219
{
52065220
# Skip --defaults-file option since it's handled above.
52075221
next if $arg =~ /^--defaults-file/;
5208-
52095222

5210-
if ($arg eq "--log-error")
5223+
if ($arg =~ /^--log[-_]error/)
52115224
{
52125225
$found_log_error= 1;
52135226
}

0 commit comments

Comments
 (0)