[MDEV-25393] Fix mysql-test/lib/mtr_cases.pm to search tests in submodules Created: 2021-04-12  Updated: 2021-04-13  Resolved: 2021-04-13

Status: Closed
Project: MariaDB Server
Component/s: Tests
Fix Version/s: 10.5.10

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MCOL-4674 Fix ColumnStore to run MTR tests in a... Closed

 Description   

This task is a dependency for MCOL-4674.
It's not possible to run ColumnStore MTR tests using:

cd mysql-test
./mtr columnstore/basic

Two problems are reported in MCOL-4674 and should be fixed inside ColumnStore repository.

The third problem should be fixed in the server repository:

Currently mysql-test/lib/mtr_cases.pm searches tests in:

storage/XXX/mysql-test/XXX

and therefore supports only these cases:

  • both plugin sources and MTR tests for this plugin are in the server repository (e.g. storage/connect)
  • the plugin sources are inside a submodule, but the plugin tests are in the server repository (e.g. storage/rocksdb)

but it does not support the case when:

  • both plugin sources and MTR tests for this plugin reside in a submodule (e.g. storage/columnstore)

We should fix mtr_cases.pm to additionally search for tests in:

storage/XXX/XXX/mysql-test/XXX

This fix for mtr_cases.pm does the job:

diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index b61333535dc..dd003dea31d 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -64,8 +64,8 @@ my $plugin_suitedir_regex;
 my $overlay_regex;
 
 if (-d '../sql') {
-  @plugin_suitedirs= ('storage/*/mysql-test', 'plugin/*/mysql-test');
-  $overlay_regex= '\b(?:storage|plugin)/(\w+)/mysql-test\b';
+  @plugin_suitedirs= ('storage/*/mysql-test', 'plugin/*/mysql-test', 'storage/*/*/mysql-test', );
+  $overlay_regex= '\b(?:storage|plugin|storage[/][^/]*)/(\w+)/mysql-test\b';
 } else {
   @plugin_suitedirs= ('mysql-test/plugin/*');
   $overlay_regex= '\bmysql-test/plugin/(\w+)\b';


Generated at Thu Feb 08 09:37:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.