Commit 5a2d043f authored by Bjorn Munch's avatar Bjorn Munch

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
parent 6fed1e15
# 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
...@@ -32,6 +32,7 @@ sub mtr_options_from_test_file($$); ...@@ -32,6 +32,7 @@ sub mtr_options_from_test_file($$);
my $do_test; my $do_test;
my $skip_test; my $skip_test;
my %incompatible;
sub init_pattern { sub init_pattern {
my ($from, $what)= @_; my ($from, $what)= @_;
...@@ -47,6 +48,15 @@ sub init_pattern { ...@@ -47,6 +48,15 @@ sub init_pattern {
} }
sub collect_incomp_tests {
open (INCOMP, "lib/v1/incompatible.tests");
while (<INCOMP>)
{
next unless /^\w/;
s/\s.*\n//; # Ignore anything from first white space
$incompatible{$_}= 1;
}
}
############################################################################## ##############################################################################
# #
...@@ -58,6 +68,8 @@ sub collect_test_cases ($) { ...@@ -58,6 +68,8 @@ sub collect_test_cases ($) {
$do_test= init_pattern($::opt_do_test, "--do-test"); $do_test= init_pattern($::opt_do_test, "--do-test");
$skip_test= init_pattern($::opt_skip_test, "--skip-test"); $skip_test= init_pattern($::opt_skip_test, "--skip-test");
collect_incomp_tests();
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
...@@ -528,6 +540,13 @@ sub collect_one_test_case($$$$$$$$$) { ...@@ -528,6 +540,13 @@ sub collect_one_test_case($$$$$$$$$) {
$tinfo->{'component_id'} = $component_id; $tinfo->{'component_id'} = $component_id;
push(@$cases, $tinfo); 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 # Skip some tests but include in list, just mark them to skip
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
......
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