summaryrefslogtreecommitdiff
path: root/mysql-test/lib
diff options
context:
space:
mode:
authorBjorn Munch <Bjorn.Munch@sun.com>2009-03-27 11:25:24 +0100
committerBjorn Munch <Bjorn.Munch@sun.com>2009-03-27 11:25:24 +0100
commitfd6beee8d771d5f69ed50fba4e69a782351ccd75 (patch)
tree292a7f89fadde6f0ea6ccea4139a72d27fcbc93d /mysql-test/lib
parent37085905e5d8a718548c5192e88d85f18f09f878 (diff)
downloadmariadb-git-fd6beee8d771d5f69ed50fba4e69a782351ccd75.tar.gz
Bug #42807 MTR: './mtr somesuite.sometest' fails if somesuite is not in DEFAULT_SUITES
If suite specified as part of test name, collect from that suite too.
Diffstat (limited to 'mysql-test/lib')
-rw-r--r--mysql-test/lib/mtr_cases.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index 23a85ef7ecc..09db2ad2ca6 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -119,11 +119,22 @@ sub collect_test_cases ($$) {
if ( $test->{name} =~ /.*\.$tname/ )
{
$found= 1;
+ last;
}
}
if ( not $found )
{
- mtr_error("Could not find '$tname' in '$suites' suite(s)");
+ mtr_error("Could not find '$tname' in '$suites' suite(s)") unless $sname;
+ # If suite was part of name, find it there
+ my ($this_case) = collect_one_suite($sname, [ $tname ]);
+ if ($this_case)
+ {
+ push (@$cases, $this_case);
+ }
+ else
+ {
+ mtr_error("Could not find '$tname' in '$sname' suite");
+ }
}
}
}