From 0952b9b59b0000c81d1f6e3a234721c5c6e1b434 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Thu, 16 Jul 2009 14:05:46 +0200 Subject: [PATCH] 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 --- mysql-test/lib/v1/incompatible.tests | 6 ++++++ mysql-test/lib/v1/mtr_cases.pl | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 mysql-test/lib/v1/incompatible.tests diff --git a/mysql-test/lib/v1/incompatible.tests b/mysql-test/lib/v1/incompatible.tests new file mode 100644 index 00000000000..fefdad9ce4c --- /dev/null +++ b/mysql-test/lib/v1/incompatible.tests @@ -0,0 +1,6 @@ +# This file lists tests that cannot run in MTR v1 for some reason. +# They will be skipped. +# Any text following white space after full test name is ignored +# Only exact test names can be used, no regexp. + +main.fulltext_plugin # Refers to $SIMPLE_PARSER_OPT which is not set diff --git a/mysql-test/lib/v1/mtr_cases.pl b/mysql-test/lib/v1/mtr_cases.pl index 4d7b1f4ec70..bed24bcabfb 100644 --- a/mysql-test/lib/v1/mtr_cases.pl +++ b/mysql-test/lib/v1/mtr_cases.pl @@ -32,6 +32,7 @@ sub mtr_options_from_test_file($$); my $do_test; my $skip_test; +my %incompatible; sub init_pattern { my ($from, $what)= @_; @@ -47,6 +48,15 @@ sub init_pattern { } +sub collect_incomp_tests { + open (INCOMP, "lib/v1/incompatible.tests"); + while () + { + next unless /^\w/; + s/\s.*\n//; # Ignore anything from first white space + $incompatible{$_}= 1; + } +} ############################################################################## # @@ -58,6 +68,8 @@ sub collect_test_cases ($) { $do_test= init_pattern($::opt_do_test, "--do-test"); $skip_test= init_pattern($::opt_skip_test, "--skip-test"); + collect_incomp_tests(); + my $suites= shift; # Semicolon separated list of test suites my $cases = []; # Array of hash @@ -528,6 +540,13 @@ sub collect_one_test_case($$$$$$$$$) { $tinfo->{'component_id'} = $component_id; push(@$cases, $tinfo); + if (exists ($incompatible{$tinfo->{'name'}})) + { + $tinfo->{'skip'}= 1; + $tinfo->{'comment'}= "Test cannot run in mtr v1"; + return; + } + # ---------------------------------------------------------------------- # Skip some tests but include in list, just mark them to skip # ----------------------------------------------------------------------