From fd6beee8d771d5f69ed50fba4e69a782351ccd75 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Fri, 27 Mar 2009 11:25:24 +0100 Subject: [PATCH] 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. --- mysql-test/lib/mtr_cases.pm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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"); + } } } }