/** */
$options = array( 'quick', 'color', 'quiet', 'help', 'show-output', 'record' );
-$optionsWithArgs = array( 'regex', 'seed' );
+$optionsWithArgs = array( 'regex', 'seed', 'setversion' );
require_once( 'commandLine.inc' );
require_once( "$IP/maintenance/parserTestsParserHook.php" );
* and all that fun stuff
*/
function start() {
- global $wgDBtype, $wgDBprefix;
+ global $wgDBtype, $wgDBprefix, $options;
$this->db->begin();
if( ! $this->db->tableExists( 'testrun' )
$this->db->insert( 'testrun',
array(
'tr_date' => $this->db->timestamp(),
- 'tr_mw_version' => SpecialVersion::getVersion(),
+ 'tr_mw_version' => isset( $options['setversion'] ) ?
+ $options['setversion'] : SpecialVersion::getVersion(),
'tr_php_version' => phpversion(),
'tr_db_version' => $this->db->getServerVersion(),
'tr_uname' => php_uname()
--file=<testfile> Run test cases from a custom file instead of parserTests.txt
--record Record tests in database
--compare Compare with recorded results, without updating the database.
+ --setversion When using --record, set the version string to use (useful
+ with git-svn so that you can get the exact revision)
--keep-uploads Re-use the same upload directory for each test, don't delete it
--fuzz Do a fuzz test instead of a normal test
--seed <n> Start the fuzz test from the specified seed