From: Antoine Musso Date: Tue, 9 Jan 2007 14:20:50 +0000 (+0000) Subject: * document --record (would have saved me 1 hour of work this morning) X-Git-Tag: 1.31.0-rc.0~54550 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=51e9b02b5dadf74910a847bbfd0886a71b120d87;p=lhc%2Fweb%2Fwiklou.git * document --record (would have saved me 1 hour of work this morning) * --record automaticly create tables if they do not exists. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index eb6d6672b6..ad38eeab54 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -30,6 +30,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 6638) List block flags in block log entries * New script maintenance/language/checkExtensioni18n.php used to check i18n progress in the extension repository. +* Running maintenance/parserTests.php with '--record' option, will now automaticly + tries to create its database tables. == Languages updated == diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc index e5fd8c682f..ec2388c11a 100644 --- a/maintenance/parserTests.inc +++ b/maintenance/parserTests.inc @@ -955,6 +955,12 @@ class DbTestRecorder extends TestRecorder { $this->db->begin(); + if( ! $this->db->tableExists( 'testrun' ) or ! $this->db->tableExists( 'testitem') ) { + print "WARNING> `testrun` table not found in database. Trying to create table.\n"; + dbsource( 'testRunner.sql', $this->db ); + echo "OK, resuming.\n"; + } + // We'll make comparisons against the previous run later... $this->prevRun = $this->db->selectField( 'testrun', 'MAX(tr_id)' ); diff --git a/maintenance/parserTests.php b/maintenance/parserTests.php index bd14778865..0a11a73fb7 100644 --- a/maintenance/parserTests.php +++ b/maintenance/parserTests.php @@ -31,6 +31,7 @@ MediaWiki $wgVersion parser test suite Usage: php parserTests.php [--quick] [--quiet] [--show-output] [--color[=(yes|no|light)]] [--regex=] [--file=] + [--record] [--help] Options: --quick Suppress diff output of failed tests @@ -40,6 +41,7 @@ Options: 'light' option is similar to 'yes' but with color for dark backgrounds --regex Only run tests whose descriptions which match given regex --file Run test cases from a custom file instead of parserTests.txt + --record Record tests in database --help Show this help message