mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merge branch '10.5' into 10.6
This commit is contained in:
@@ -154,7 +154,17 @@ sub collect_test_cases ($$$$) {
|
||||
{
|
||||
push (@$cases, @this_case);
|
||||
}
|
||||
else
|
||||
elsif ($::opt_skip_not_found)
|
||||
{
|
||||
push @$cases, My::Test->new
|
||||
(
|
||||
name => "$sname.$tname",
|
||||
shortname => $tname,
|
||||
skip => 1,
|
||||
comment => 'not found',
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
mtr_error("Could not find '$tname' in '$sname' suite");
|
||||
}
|
||||
@@ -614,7 +624,7 @@ sub make_combinations($$@)
|
||||
{
|
||||
my ($test, $test_combs, @combinations) = @_;
|
||||
|
||||
return ($test) if $test->{'skip'} or not @combinations;
|
||||
return ($test) unless @combinations;
|
||||
if ($combinations[0]->{skip}) {
|
||||
$test->{skip} = 1;
|
||||
$test->{comment} = $combinations[0]->{skip} unless $test->{comment};
|
||||
@@ -647,6 +657,8 @@ sub make_combinations($$@)
|
||||
}
|
||||
}
|
||||
|
||||
return ($test) if $test->{'skip'};
|
||||
|
||||
my @cases;
|
||||
foreach my $comb (@combinations)
|
||||
{
|
||||
|
@@ -76,6 +76,30 @@ if (-t STDOUT) {
|
||||
}
|
||||
}
|
||||
|
||||
# On Windows, stdio does not support line buffering
|
||||
# This can make MTR output from multiple forked processes interleaved, messed up.
|
||||
# Below is DYI stdout line buffering.
|
||||
my $out_line="";
|
||||
|
||||
# Flush buffered line
|
||||
sub flush_out {
|
||||
print $out_line;
|
||||
$out_line = "";
|
||||
}
|
||||
|
||||
# Print to stdout
|
||||
sub print_out {
|
||||
if(IS_WIN32PERL) {
|
||||
$out_line .= $_[0];
|
||||
# Flush buffered output on new lines.
|
||||
if (rindex($_[0], "\n") != -1) {
|
||||
flush_out();
|
||||
}
|
||||
} else {
|
||||
print($_[0]);
|
||||
}
|
||||
}
|
||||
|
||||
sub titlebar_stat($) {
|
||||
|
||||
sub time_format($) {
|
||||
@@ -116,10 +140,10 @@ sub _mtr_report_test_name ($) {
|
||||
|
||||
return unless defined $verbose;
|
||||
|
||||
print _name(). _timestamp();
|
||||
printf "%-40s ", $tname;
|
||||
print_out _name(). _timestamp();
|
||||
print_out (sprintf "%-40s ", $tname);
|
||||
my $worker = $tinfo->{worker};
|
||||
print "w$worker " if defined $worker;
|
||||
print_out "w$worker " if defined $worker;
|
||||
|
||||
return $tname;
|
||||
}
|
||||
@@ -661,14 +685,14 @@ sub mtr_report (@) {
|
||||
{
|
||||
my @s = split /\[ (\S+) \]/, _name() . "@_\n";
|
||||
if (@s > 1) {
|
||||
print $s[0];
|
||||
print_out $s[0];
|
||||
&$set_color($s[1]);
|
||||
print "[ $s[1] ]";
|
||||
print_out "[ $s[1] ]";
|
||||
&$set_color('reset');
|
||||
print $s[2];
|
||||
print_out $s[2];
|
||||
titlebar_stat($s[1]) if $set_titlebar;
|
||||
} else {
|
||||
print $s[0];
|
||||
print_out $s[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -676,6 +700,7 @@ sub mtr_report (@) {
|
||||
|
||||
# Print warning to screen
|
||||
sub mtr_warning (@) {
|
||||
flush_out();
|
||||
print STDERR _name(). _timestamp().
|
||||
"mysql-test-run: WARNING: ". join(" ", @_). "\n";
|
||||
}
|
||||
@@ -683,7 +708,7 @@ sub mtr_warning (@) {
|
||||
|
||||
# Print error to screen and then exit
|
||||
sub mtr_error (@) {
|
||||
IO::Handle::flush(\*STDOUT) if IS_WINDOWS;
|
||||
flush_out();
|
||||
print STDERR _name(). _timestamp().
|
||||
"mysql-test-run: *** ERROR: ". join(" ", @_). "\n";
|
||||
if (IS_WINDOWS)
|
||||
|
Reference in New Issue
Block a user