1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix reorder

This commit is contained in:
msvensson@pilot.mysql.com
2008-01-09 11:15:59 +01:00
parent 3f910d48f2
commit af4bede6df
2 changed files with 5 additions and 4 deletions

View File

@ -37,6 +37,7 @@ our $default_storage_engine;
our $opt_with_ndbcluster_only;
our $defaults_file;
our $defaults_extra_file;
our $reorder;
sub collect_option {
my ($opt, $value)= @_;
@ -120,7 +121,7 @@ sub collect_test_cases ($$) {
}
}
if ( $::opt_reorder )
if ( $reorder )
{
# Reorder the test cases in an order that will make them faster to run
my %sort_criteria;
@ -173,7 +174,8 @@ sub collect_test_cases ($$) {
push(@criteria, "ndb=" . ($tinfo->{'ndb_test'} ? "1" : "0"));
# Group test with equal options together.
# Ending with "~" makes empty sort later than filled
push(@criteria, join("!", sort @{$tinfo->{'master_opt'}}) . "~");
my $opts= $tinfo->{'master_opt'} ? $tinfo->{'master_opt'} : [];
push(@criteria, join("!", sort @{$opts}) . "~");
$sort_criteria{$test_name} = join(" ", @criteria);
}