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
--------------------------------------------------------------------------
This commit is contained in:
Alexander Barkov 2024-06-02 13:17:51 +04:00 committed by Sergei Golubchik
parent a2bd936c52
commit 3b80d23d02

View File

@ -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.