diff options
author | unknown <msvensson@pilot.mysql.com> | 2008-01-09 11:15:59 +0100 |
---|---|---|
committer | unknown <msvensson@pilot.mysql.com> | 2008-01-09 11:15:59 +0100 |
commit | 85ba3d96c8c03094ece054d603fae23ec2882577 (patch) | |
tree | a9b48ff7e8e4faf2b2b2c85a6b7ddc7bbdc21f22 | |
parent | 039123e1874cc81e5fb2d0143d1bda9757c163fc (diff) | |
download | mariadb-git-85ba3d96c8c03094ece054d603fae23ec2882577.tar.gz |
Fix reorder
-rw-r--r-- | mysql-test/lib/mtr_cases.pm | 6 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 5e07c01bf7f..5dc76db99e4 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -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); } diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index e3b89707e57..5fd0ff5e277 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -124,7 +124,6 @@ sub using_extern { return (keys %opts_extern > 0);}; our $opt_fast= 0; our $opt_force; -our $opt_reorder= 0; our $opt_mem= $ENV{'MTR_MEM'}; our $opt_gcov; @@ -368,7 +367,7 @@ sub command_line_setup { 'report-features' => \$opt_report_features, 'comment=s' => \$opt_comment, 'fast' => \$opt_fast, - 'reorder' => \$opt_reorder, + 'reorder' => \&collect_option, 'enable-disabled' => \&collect_option, 'verbose+' => \$opt_verbose, 'sleep=i' => \$opt_sleep, |