From 3b80d23d022f462c34cee2ec33cdc46162eb2656 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Sun, 2 Jun 2024 13:17:51 +0400 Subject: [PATCH] mtr --skip-not-found did not skip suites --skip-not-found switch tells mtr to skip not found tests instead of aborting. But it failed to skip the test if the suite name was not found. This problem also made the *last-N-failed builbot builders fail to run `mtr --skip-not-found` if the last commit removed a file in the mysql-test/include/ directory. This commit fixes it, now the not found test is properly skipped, no matter what component of the test name was not found: $ ./mtr main.foo --skip-not-found foo.main ... ============================================================================== TEST WORKER RESULT TIME (ms) or COMMENT -------------------------------------------------------------------------- foo.main [ skipped ] not found main.foo [ skipped ] not found -------------------------------------------------------------------------- --- mysql-test/lib/mtr_cases.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index c72717578cb..d9ab10b60f6 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -398,7 +398,8 @@ sub collect_suite_name($$) { my @dirs = my_find_dir(dirname($::glob_mysql_test_dir), ["mysql-test/suite", @plugin_suitedirs ], - $suitename); + $suitename, + $::opt_skip_not_found ? NOT_REQUIRED : undef); # # if $suitename contained wildcards, we'll have many suites and # their overlays here. Let's group them appropriately.