diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2009-10-21 12:57:33 +0200 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2009-10-21 12:57:33 +0200 |
commit | 9ef69958c5f9c0078b6e440cc2730c459d40964f (patch) | |
tree | f0b0fae716640619475cf5f3d5363d0ca84f609e /mysql-test/lib/mtr_cases.pm | |
parent | 6e7a37d3e8fc1f32c382dae143eb091be1eb1e8f (diff) | |
parent | 37b6043070ebed97158c4ef9e3c8534a8c23c860 (diff) | |
download | mariadb-git-9ef69958c5f9c0078b6e440cc2730c459d40964f.tar.gz |
Merge
Diffstat (limited to 'mysql-test/lib/mtr_cases.pm')
-rw-r--r-- | mysql-test/lib/mtr_cases.pm | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 1a7ecee40d6..448abb5bcbe 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -41,6 +41,7 @@ our $opt_with_ndbcluster_only; our $defaults_file; our $defaults_extra_file; our $reorder= 1; +our $quick_collect; sub collect_option { my ($opt, $value)= @_; @@ -68,6 +69,9 @@ require "mtr_misc.pl"; my $do_test_reg; my $skip_test_reg; +# If "Quick collect", set to 1 once a test to run has been found. +my $some_test_found; + sub init_pattern { my ($from, $what)= @_; return undef unless defined $from; @@ -102,6 +106,7 @@ sub collect_test_cases ($$) { foreach my $suite (split(",", $suites)) { push(@$cases, collect_one_suite($suite, $opt_cases)); + last if $some_test_found; } if ( @$opt_cases ) @@ -139,7 +144,7 @@ sub collect_test_cases ($$) { } } - if ( $reorder ) + if ( $reorder && !$quick_collect) { # Reorder the test cases in an order that will make them faster to run my %sort_criteria; @@ -386,7 +391,7 @@ sub collect_one_suite($) # Read combinations for this suite and build testcases x combinations # if any combinations exists # ---------------------------------------------------------------------- - if ( ! $skip_combinations ) + if ( ! $skip_combinations && ! $quick_collect ) { my @combinations; my $combination_file= "$suitedir/combinations"; @@ -584,6 +589,12 @@ sub optimize_cases { if ( $default_engine =~ /^innodb/i ); } } + + if ($quick_collect && ! $tinfo->{'skip'}) + { + $some_test_found= 1; + return; + } } } @@ -848,14 +859,14 @@ sub collect_one_test_case { if ( $tinfo->{'big_test'} and ! $::opt_big_test ) { $tinfo->{'skip'}= 1; - $tinfo->{'comment'}= "Test need 'big-test' option"; + $tinfo->{'comment'}= "Test needs 'big-test' option"; return $tinfo } if ( $tinfo->{'need_debug'} && ! $::debug_compiled_binaries ) { $tinfo->{'skip'}= 1; - $tinfo->{'comment'}= "Test need debug binaries"; + $tinfo->{'comment'}= "Test needs debug binaries"; return $tinfo } @@ -891,14 +902,14 @@ sub collect_one_test_case { if ($tinfo->{'federated_test'}) { - # This is a test that need federated, enable it + # This is a test that needs federated, enable it push(@{$tinfo->{'master_opt'}}, "--loose-federated"); push(@{$tinfo->{'slave_opt'}}, "--loose-federated"); } if ( $tinfo->{'innodb_test'} ) { - # This is a test that need innodb + # This is a test that needs innodb if ( $::mysqld_variables{'innodb'} eq "OFF" || ! exists $::mysqld_variables{'innodb'} ) { @@ -919,7 +930,7 @@ sub collect_one_test_case { if (grep(/^--skip-log-bin/, @::opt_extra_mysqld_opt) ) { $tinfo->{'skip'}= 1; - $tinfo->{'comment'}= "Test need binlog"; + $tinfo->{'comment'}= "Test needs binlog"; return $tinfo; } } |