mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
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
This commit is contained in:
parent
8d6a25a23f
commit
0952b9b59b
2 changed files with 25 additions and 0 deletions
6
mysql-test/lib/v1/incompatible.tests
Normal file
6
mysql-test/lib/v1/incompatible.tests
Normal file
|
@ -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
|
|
@ -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 (<INCOMP>)
|
||||
{
|
||||
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
|
||||
# ----------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue