From: Magnus Svensson Date: April 22 2008 10:32am Subject: Re: [PATCH] mysql-test-run suites for engines (nicley) List-Archive: http://lists.mysql.com/maria/13 Message-Id: <480DBEA2.8000909@mysql.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Stewart Smith skrev: > (free row of seats on plane... extended battery... not in the right > timezone... so hacking at what should be 3:30am) > > Anyway.... I dislike how engines have to either put all their > mysql-test-run tests in the mysql-test/suite > > storage/$engine/mysql-test-suites/$suite_name/[t|r] > > e.g. PBXT may have: > > storage/pbxt/mysql-test-suites/pbxt_basic (with t/ and r/) > storage/pbxt/mysql-test-suites/pbxt_advanced (with t/ and r/) > storage/pbxt/mysql-test-suites/pbxt_torture (with t/ and r/) > storage/pbxt/mysql-test-suites/pbxt_mtr (with t/ and r/) > > the idea being you just plonk the storage engine in the storage/ > directory and build the server! > > (I haven't fixed it up to install the right plugin yet... so you have to > have your engine built into the server). I've fixed PBXT and federatedX > to do this... Maria already does. > > Thoughts? (testing is welcome :) Added this same functionality to the new mtr.pl Only concerned about the really long name "mysql-test-suites"? Couldn't we go with just suites/ ? I.e storage/*/suites/ Also made it possible to to ./mtr --suite=/some/path/so/suitedir > > ===== mysql-test/lib/mtr_cases.pl 1.66 vs edited ===== > --- 1.66/mysql-test/lib/mtr_cases.pl 2008-02-06 02:07:54 +11:00 > +++ edited/mysql-test/lib/mtr_cases.pl 2008-04-22 03:34:58 +10:00 > @@ -217,8 +217,15 @@ > my $suitedir= "$::glob_mysql_test_dir"; # Default > if ( $suite ne "main" ) > { > + my $storagedir= "$::glob_basedir/storage"; > + opendir(DIR, $storagedir) || die "can't opendir $storagedir: $!"; > + my @se_tests = grep { /^[^\.]/ && -d "$storagedir/$_/mysql-test-suites/" } readdir(DIR); > + closedir DIR; > + $_="$storagedir/$_/mysql-test-suites/$suite" foreach(@se_tests); > + mtr_verbose("looking for suitedir in @se_tests"); > + > $suitedir= mtr_path_exists("$suitedir/suite/$suite", > - "$suitedir/$suite"); > + "$suitedir/$suite",@se_tests); > mtr_verbose("suitedir: $suitedir"); > } > >