Bug #31400 mysql-test-run inconvenience problems running a certain test
Submitted: 4 Oct 2007 15:31 Modified: 6 Nov 2007 17:10
Reporter: Jani Tolonen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any

[4 Oct 2007 15:31] Jani Tolonen
Description:
To give a certain test as an argument to mysql-test-run should be convenient. 

E.g. the following should all be legal syntax:

mysql-test-run alias
mysql-test-run alias.test
mysql-test-run main.alias
mysql-test-run main.alias.test
mysql-test-run t/alias
mysql-test-run t/alias.test

How to repeat:
./mysql-test-run t/alias.test

mysql-test-run: *** ERROR: Test case alias (/home/my/mysql-5.1/mysql-test/suite/binlog/t/alias.test) is not found

./mysql-test-run t/alias

mysql-test-run: *** ERROR: Could not find t/alias in any suite
[5 Oct 2007 12:42] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/34969

ChangeSet@1.2572, 2007-10-05 14:42:38+02:00, msvensson@shellback.(none) +1 -0
  Bug#31400 mysql-test-run inconvenience problems running a certain test
   - Allow test case names to be specied in various different ways
[18 Oct 2007 21:34] Bugs System
Pushed into 5.1.23-beta
[1 Nov 2007 15:28] Magnus Blåudd
>[suite_name.]test_name[.test]
>or
>[test_dir/]test_name[.test]

yes

>Is test_dir relative to the current directory if it is not an absolute pathname? >(Are
>absolute pathnames allowable?)

yes, but the whole path will be thrown away. Only what's after the last / will be taken into account.

Could actually be a nice feature to be able to specify full path to a test to run, but it's not like that now.

>With no suite name or directory path, is the default suite assumed?

Yes, the default _suites_

Currently 
our $opt_suites= "main,binlog,rpl,rpl_ndb,ndb"; # Default suites to run

So ./mtr alias.test will look in any of them for a test named alias. There could be multiple matches. They will in that case be main.alias, rpl.alias and so on.
[6 Nov 2007 17:10] Paul DuBois
Noted in 5.1.23 changelog.

mysqltest now allows a suite name prefix to be specified in
command-line arguments that name test cases. The test name syntax now
is [suite_name.]test_name[.suffix]. For example, mysql-test-run.pl
binlog.mytest runs the mytest.test test in the binlog test suite.
[6 Nov 2007 17:11] Paul DuBois
The previous comment should say mysql-test-run.pl, not mysqltest.