Commit b2a4889c authored by unknown's avatar unknown

Merge shellback.(none):/home/msvensson/mysql/mysql-5.0-maint

into  shellback.(none):/home/msvensson/mysql/mysql-5.1-maint


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Mereg 5.0->5.1
parents 047ecacb b5b89b8d
...@@ -28,6 +28,26 @@ sub collect_one_test_case ($$$$$$$$$); ...@@ -28,6 +28,26 @@ sub collect_one_test_case ($$$$$$$$$);
sub mtr_options_from_test_file($$); sub mtr_options_from_test_file($$);
my $do_test;
my $skip_test;
sub init_pattern {
my ($from, $what)= @_;
if ( $from =~ /[a-z0-9]/ ) {
# Does not contain any regex, make the pattern match
# beginning of string
$from= "^$from";
}
else {
# Check that pattern is a valid regex
eval { "" =~/$from/; 1 } or
mtr_error("Invalid regex '$from' passed to $what\nPerl says: $@");
}
return $from;
}
############################################################################## ##############################################################################
# #
# Collect information about test cases we are to run # Collect information about test cases we are to run
...@@ -35,6 +55,9 @@ sub mtr_options_from_test_file($$); ...@@ -35,6 +55,9 @@ sub mtr_options_from_test_file($$);
############################################################################## ##############################################################################
sub collect_test_cases ($) { sub collect_test_cases ($) {
$do_test= init_pattern($::opt_do_test, "--do-test");
$skip_test= init_pattern($::opt_skip_test, "--skip-test");
my $suites= shift; # Semicolon separated list of test suites my $suites= shift; # Semicolon separated list of test suites
my $cases = []; # Array of hash my $cases = []; # Array of hash
...@@ -303,8 +326,7 @@ sub collect_one_suite($$) ...@@ -303,8 +326,7 @@ sub collect_one_suite($$)
} }
# Skip tests that does not match the --do-test= filter # Skip tests that does not match the --do-test= filter
next if $::opt_do_test and next if ($do_test and not $tname =~ /$do_test/o);
! defined mtr_match_prefix($elem,$::opt_do_test);
collect_one_test_case($testdir,$resdir,$suite,$tname, collect_one_test_case($testdir,$resdir,$suite,$tname,
$elem,$cases,\%disabled,$component_id, $elem,$cases,\%disabled,$component_id,
...@@ -357,7 +379,7 @@ sub collect_one_test_case($$$$$$$$$) { ...@@ -357,7 +379,7 @@ sub collect_one_test_case($$$$$$$$$) {
# Skip some tests but include in list, just mark them to skip # Skip some tests but include in list, just mark them to skip
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
if ( $::opt_skip_test and defined mtr_match_prefix($tname,$::opt_skip_test) ) if ( $skip_test and $tname =~ /$skip_test/o )
{ {
$tinfo->{'skip'}= 1; $tinfo->{'skip'}= 1;
return; return;
......
...@@ -5044,7 +5044,7 @@ sub valgrind_arguments { ...@@ -5044,7 +5044,7 @@ sub valgrind_arguments {
} }
# Add valgrind options, can be overriden by user # Add valgrind options, can be overriden by user
mtr_add_arg($args, '%s', $_) for (split(' ', $opt_valgrind_options)); mtr_add_arg($args, '%s', $opt_valgrind_options);
mtr_add_arg($args, $$exe); mtr_add_arg($args, $$exe);
...@@ -5117,14 +5117,18 @@ Options to control what test suites or cases to run ...@@ -5117,14 +5117,18 @@ Options to control what test suites or cases to run
skip-ndb[cluster] Skip all tests that need cluster skip-ndb[cluster] Skip all tests that need cluster
skip-ndb[cluster]-slave Skip all tests that need a slave cluster skip-ndb[cluster]-slave Skip all tests that need a slave cluster
ndb-extra Run extra tests from ndb directory ndb-extra Run extra tests from ndb directory
do-test=PREFIX Run test cases which name are prefixed with PREFIX do-test=PREFIX or REGEX
Run test cases which name are prefixed with PREFIX
or fulfills REGEX
skip-test=PREFIX or REGEX
Skip test cases which name are prefixed with PREFIX
or fulfills REGEX
start-from=PREFIX Run test cases starting from test prefixed with PREFIX start-from=PREFIX Run test cases starting from test prefixed with PREFIX
suite[s]=NAME1,..,NAMEN Collect tests in suites from the comma separated suite[s]=NAME1,..,NAMEN Collect tests in suites from the comma separated
list of suite names. list of suite names.
The default is: "$opt_suites" The default is: "$opt_suites"
skip-rpl Skip the replication test cases. skip-rpl Skip the replication test cases.
skip-im Don't start IM, and skip the IM test cases skip-im Don't start IM, and skip the IM test cases
skip-test=PREFIX Skip test cases which name are prefixed with PREFIX
big-test Set the environment variable BIG_TEST, which can be big-test Set the environment variable BIG_TEST, which can be
checked from test cases. checked from test cases.
......
...@@ -1435,7 +1435,10 @@ select "this will be executed"; ...@@ -1435,7 +1435,10 @@ select "this will be executed";
--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/query.sql -R $MYSQLTEST_VARDIR/tmp/zero_length_file.result > /dev/null 2>&1 --exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/query.sql -R $MYSQLTEST_VARDIR/tmp/zero_length_file.result > /dev/null 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/zero_length_file.result; remove_file $MYSQLTEST_VARDIR/tmp/zero_length_file.result;
--error 0,1
remove_file $MYSQLTEST_VARDIR/log/zero_length_file.reject; remove_file $MYSQLTEST_VARDIR/log/zero_length_file.reject;
--error 0,1
remove_file $MYSQL_TEST_DIR/r/zero_length_file.reject;
# #
# Test that a test file that does not generate any output fails. # Test that a test file that does not generate any output fails.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment