Skip to content

Commit 0952b9b

Browse files
Bjorn MunchBjorn Munch
Bjorn Munch
authored and
Bjorn Munch
committed
Bug #45698 MTR_VERSION=1 ./mtr --force does not work
General problem: some test cannot run in V1, expect more in future Implement general mechanism for listing incompatible tests
1 parent 8d6a25a commit 0952b9b

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

mysql-test/lib/v1/incompatible.tests

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# This file lists tests that cannot run in MTR v1 for some reason.
2+
# They will be skipped.
3+
# Any text following white space after full test name is ignored
4+
# Only exact test names can be used, no regexp.
5+
6+
main.fulltext_plugin # Refers to $SIMPLE_PARSER_OPT which is not set

mysql-test/lib/v1/mtr_cases.pl

+19
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
my $do_test;
3434
my $skip_test;
35+
my %incompatible;
3536

3637
sub init_pattern {
3738
my ($from, $what)= @_;
@@ -47,6 +48,15 @@ sub init_pattern {
4748
}
4849

4950

51+
sub collect_incomp_tests {
52+
open (INCOMP, "lib/v1/incompatible.tests");
53+
while (<INCOMP>)
54+
{
55+
next unless /^\w/;
56+
s/\s.*\n//; # Ignore anything from first white space
57+
$incompatible{$_}= 1;
58+
}
59+
}
5060

5161
##############################################################################
5262
#
@@ -58,6 +68,8 @@ ($)
5868
$do_test= init_pattern($::opt_do_test, "--do-test");
5969
$skip_test= init_pattern($::opt_skip_test, "--skip-test");
6070

71+
collect_incomp_tests();
72+
6173
my $suites= shift; # Semicolon separated list of test suites
6274
my $cases = []; # Array of hash
6375

@@ -528,6 +540,13 @@ ($$$$$$$$$)
528540
$tinfo->{'component_id'} = $component_id;
529541
push(@$cases, $tinfo);
530542

543+
if (exists ($incompatible{$tinfo->{'name'}}))
544+
{
545+
$tinfo->{'skip'}= 1;
546+
$tinfo->{'comment'}= "Test cannot run in mtr v1";
547+
return;
548+
}
549+
531550
# ----------------------------------------------------------------------
532551
# Skip some tests but include in list, just mark them to skip
533552
# ----------------------------------------------------------------------

0 commit comments

Comments
 (0)