Hi! 5 окт. 2009, в 14:06, knielsen@knielsen-hq.org написал(а):
#At lp:maria
2741 knielsen@knielsen-hq.org 2009-10-05 MBug#443014: Too many 'skipped' messages in mysql-test-run
Remove mysql-test-run.pl unnecessary and confusing 'skipped' messages.
- In mysql-test-run.pl, we auto-generate combinations of replication tests. But this sometimes generates combinations that are meaningless, like running a test that requires row-based replication with statement- based. These superfluous combinationes should not be reported as skipped, they should just be deleted.
- Remove ndb suites from default suites, as we do not support NDB in MariaDB.
Keep skip messages resulting from running mysql-test-run.pl in special ways, eg. --mysqld=--binlog-format=statement. modified: mysql-test/lib/mtr_cases.pm mysql-test/mysql-test-run.pl
=== modified file 'mysql-test/lib/mtr_cases.pm' --- a/mysql-test/lib/mtr_cases.pm 2009-09-07 20:50:10 +0000 +++ b/mysql-test/lib/mtr_cases.pm 2009-10-05 11:06:49 +0000 @@ -560,10 +560,13 @@ sub collect_one_suite($) sub optimize_cases { my ($cases)= @_;
- foreach my $tinfo ( @$cases ) + my $i= 0; + while ($i < @$cases) { + my $tinfo= $cases->[$i]; + # Skip processing if already marked as skipped - next if $tinfo->{skip}; + goto next_iteration if $tinfo->{skip};
# ======================================================= # If a special binlog format was selected with @@ -615,6 +618,13 @@ sub optimize_cases { $tinfo->{'skip'}= 1; $tinfo->{'comment'}= "Doesn't support --binlog-format='$test_binlog_format'"; + # This test was added as a replication combination, but it is not + # actually ever possible to run it, as it is not made for this + # combination. + # So delete it from the list, rather than confuse the user with a + # message that this test is skipped (it is not really, just run + # with other combinations). + splice(@$cases, $i, 1); next; } } @@ -682,6 +692,9 @@ sub optimize_cases { if ( $default_engine =~ /^innodb/i ); } } + + next_iteration: + $i++; } }
There 'for' loop should be used, something like this: CASES: for(my $i=0; $i < @$cases; $i++) { ... next CASES if $tinfo->{skip}; ... } all else looks OK.