mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge
mysql-test/lib/mtr_cases.pl: Auto merged scripts/make_binary_distribution.sh: Auto merged
This commit is contained in:
@ -111,7 +111,7 @@ sub collect_test_cases ($) {
|
||||
# Disable some tests listed in disabled.def
|
||||
# ----------------------------------------------------------------------
|
||||
my %disabled;
|
||||
if ( open(DISABLED, "$testdir/disabled.def" ) )
|
||||
if ( ! $::opt_ignore_disabled_def and open(DISABLED, "$testdir/disabled.def" ) )
|
||||
{
|
||||
while ( <DISABLED> )
|
||||
{
|
||||
@ -277,8 +277,8 @@ sub collect_one_test_case($$$$$$$) {
|
||||
my $disabled_file= "$testdir/$tname.disabled";
|
||||
my $im_opt_file= "$testdir/$tname-im.opt";
|
||||
|
||||
$tinfo->{'master_opt'}= $::glob_win32 ? ["--default-time-zone=+3:00"] : [];
|
||||
$tinfo->{'slave_opt'}= $::glob_win32 ? ["--default-time-zone=+3:00"] : [];
|
||||
$tinfo->{'master_opt'}= [];
|
||||
$tinfo->{'slave_opt'}= [];
|
||||
$tinfo->{'slave_mi'}= [];
|
||||
|
||||
if ( -f $master_opt_file )
|
||||
@ -301,7 +301,6 @@ sub collect_one_test_case($$$$$$$) {
|
||||
if ( defined $value )
|
||||
{
|
||||
$tinfo->{'timezone'}= $value;
|
||||
$tinfo->{'skip'}= 1 if $::glob_win32; # FIXME server unsets TZ
|
||||
last MASTER_OPT;
|
||||
}
|
||||
|
||||
|
@ -781,7 +781,15 @@ sub mtr_record_dead_children () {
|
||||
}
|
||||
|
||||
sub start_reap_all {
|
||||
$SIG{CHLD}= 'IGNORE'; # FIXME is this enough?
|
||||
# This causes terminating processes to not become zombies, avoiding
|
||||
# the need for (or possibility of) explicit waitpid().
|
||||
$SIG{CHLD}= 'IGNORE';
|
||||
|
||||
# On some platforms (Linux, QNX, OSX, ...) there is potential race
|
||||
# here. If a process terminated before setting $SIG{CHLD} (but after
|
||||
# any attempt to waitpid() it), it will still be a zombie. So we
|
||||
# have to handle any such process here.
|
||||
while(waitpid(-1, &WNOHANG) > 0) { };
|
||||
}
|
||||
|
||||
sub stop_reap_all {
|
||||
|
@ -185,39 +185,57 @@ sub mtr_report_stats ($) {
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# If a debug run, there might be interesting information inside
|
||||
# the "var/log/*.err" files. We save this info in "var/log/warnings"
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
if ( ! $::glob_use_running_server )
|
||||
{
|
||||
# Save and report if there was any fatal warnings/errors in err logs
|
||||
|
||||
# Report if there was any fatal warnings/errors in the log files
|
||||
#
|
||||
unlink("$::opt_vardir/log/warnings");
|
||||
unlink("$::opt_vardir/log/warnings.tmp");
|
||||
# Remove some non fatal warnings from the log files
|
||||
my $warnlog= "$::opt_vardir/log/warnings";
|
||||
|
||||
# FIXME what is going on ????? ;-)
|
||||
# sed -e 's!Warning: Table:.* on delete!!g' -e 's!Warning: Setting lower_case_table_names=2!!g' -e 's!Warning: One can only use the --user.*root!!g' \
|
||||
# var/log/*.err \
|
||||
# | sed -e 's!Warning: Table:.* on rename!!g' \
|
||||
# > var/log/warnings.tmp;
|
||||
#
|
||||
# found_error=0;
|
||||
# # Find errors
|
||||
# for i in "^Warning:" "^Error:" "^==.* at 0x"
|
||||
# do
|
||||
# if ( $GREP "$i" var/log/warnings.tmp >> var/log/warnings )
|
||||
# {
|
||||
# found_error=1
|
||||
# }
|
||||
# done
|
||||
# unlink("$::opt_vardir/log/warnings.tmp");
|
||||
# if ( $found_error= "1" )
|
||||
# {
|
||||
# print "WARNING: Got errors/warnings while running tests. Please examine\n"
|
||||
# print "$::opt_vardir/log/warnings for details.\n"
|
||||
# }
|
||||
# }
|
||||
unless ( open(WARN, ">$warnlog") )
|
||||
{
|
||||
mtr_warning("can't write to the file \"$warnlog\": $!");
|
||||
}
|
||||
else
|
||||
{
|
||||
my $found_problems= 0; # Some warnings are errors...
|
||||
|
||||
# We report different types of problems in order
|
||||
foreach my $pattern ( "^Warning:", "^Error:", "^==.* at 0x" )
|
||||
{
|
||||
foreach my $errlog ( sort glob("$::opt_vardir/log/*.err") )
|
||||
{
|
||||
unless ( open(ERR, $errlog) )
|
||||
{
|
||||
mtr_warning("can't read $errlog");
|
||||
next;
|
||||
}
|
||||
while ( <ERR> )
|
||||
{
|
||||
# Skip some non fatal warnings from the log files
|
||||
if ( /Warning:\s+Table:.* on (delete|rename)/ or
|
||||
/Warning:\s+Setting lower_case_table_names=2/ or
|
||||
/Warning:\s+One can only use the --user.*root/ )
|
||||
{
|
||||
next; # Skip these lines
|
||||
}
|
||||
if ( /$pattern/ )
|
||||
{
|
||||
$found_problems= 1;
|
||||
print WARN $_;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( $found_problems )
|
||||
{
|
||||
mtr_warning("Got errors/warnings while running tests, please examine",
|
||||
"\"$warnlog\" for details.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print "\n";
|
||||
|
Reference in New Issue
Block a user