Merge "Improve documentation of maintenance scripts and test suite."

This commit is contained in:
Siebrand 2012-10-03 15:04:10 +00:00 committed by Gerrit Code Review
commit fec6387fc4
9 changed files with 165 additions and 23 deletions

View file

@ -19,12 +19,14 @@
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Testing
* @ingroup Maintenance Testing
* @todo Fixme: Make this more generic
*/
/**
* Terminal that supports ANSI escape sequences.
*
* @ingroup Maintenance Testing
*/
class AnsiTermColorer {
function __construct() {
@ -56,6 +58,8 @@ class AnsiTermColorer {
/**
* A colour-less terminal
*
* @ingroup Maintenance Testing
*/
class DummyTermColorer {
public function color( $color ) {

View file

@ -2,6 +2,21 @@
/**
* New version of MediaWiki web-based config/installation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
*/

View file

@ -1,4 +1,25 @@
<?php
/**
* Version of mw-config/index.php to used in web server requiring .php5
* extension to execute scripts with PHP5 egine.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
*/
define('MW_INSTALL_PHP5_EXT', 1);
require './index.php';

View file

@ -5,6 +5,23 @@
* Altering it is preferred over changing anything in /includes.
*
* Note: this file doesn't gets included from a global scope, don't use globals directly.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
*/
/*

View file

@ -1,4 +1,24 @@
<?php
/**
* Definition of core ResourceLoader modules.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
*/
return array(

View file

@ -1,4 +1,25 @@
<?php
/**
* Serialize variables found in input file and store the result in the
* specified file.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
*/
if ( !defined( 'MEDIAWIKI' ) ) {
$wgNoDBParam = true;
@ -62,7 +83,7 @@ function unixLineEndings( $var ) {
fwrite( $stderr, "Error: Recursion limit exceeded. Possible circular reference in array variable.\n" );
exit( 2 );
}
if ( is_array( $var ) ) {
++$recursionLevel;
$var = array_map( 'unixLineEndings', $var );

View file

@ -1,4 +1,25 @@
<?php
/**
* AutoLoader for the testing suite.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Testing
*/
global $wgAutoloadClasses;
$testFolder = __DIR__;

View file

@ -1,23 +1,25 @@
<?php
# Copyright (C) 2004, 2010 Brion Vibber <brion@pobox.com>
# http://www.mediawiki.org/
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# http://www.gnu.org/copyleft/gpl.html
/**
* Helper code for the MediaWiki parser test suite.
*
* Copyright © 2004, 2010 Brion Vibber <brion@pobox.com>
* http://www.mediawiki.org/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @todo Make this more independent of the configuration (and if possible the database)
* @todo document
* @file

View file

@ -1,4 +1,25 @@
<?php
/**
* Recording for passing/failing tests.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Testing
*/
class TestRecorder {
var $parent;
@ -483,7 +504,7 @@ class TestFileIterator implements Iterator {
private function clearSection() {
$this->sectionData = array();
$this->section = null;
}
/**
@ -492,7 +513,7 @@ class TestFileIterator implements Iterator {
* Throw an exception if it is not set, referencing current section
* and adding the current file name and line number
*
* @param $token String: expected token that should have been mentionned before closing this section
* @param $token String: expected token that should have been mentionned before closing this section
*/
private function checkSection( $token ) {
if( is_null( $this->section ) ) {
@ -536,7 +557,7 @@ class DelayedParserTest {
/**
* Called whenever we actually want to run the hook.
* Should be the case if we found the parserTest is not disabled
* Should be the case if we found the parserTest is not disabled
*/
public function unleash( &$parserTest ) {
if( !($parserTest instanceof ParserTest || $parserTest instanceof NewParserTest