http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94673
Revision: 94673 Author: hashar Date: 2011-08-16 18:23:13 +0000 (Tue, 16 Aug 2011) Log Message: ----------- enable colors in PHPUnit (redoing r89179). suite.xml now comes with colors=true. Under Windows, we override the setting by forging a --no-colors. One can still force color usage under windows by using --colors. Modified Paths: -------------- trunk/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php trunk/phase3/tests/phpunit/suite.xml Modified: trunk/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php =================================================================== --- trunk/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php 2011-08-16 18:16:40 UTC (rev 94672) +++ trunk/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php 2011-08-16 18:23:13 UTC (rev 94673) @@ -17,6 +17,17 @@ public static function main( $exit = true ) { $command = new self; + + if( wfIsWindows() ) { + # Windows does not come anymore with ANSI.SYS loaded by default + # PHPUnit uses the suite.xml parameters to enable/disable colors + # which can be then forced to be enabled with --colors. + # The below code inject a parameter just like if the user called + # phpunit with a --no-color option (which does not exist). It + # overrides the suite.xml setting. + # Probably fix bug 29226 + $command->arguments['colors'] = false; + } $command->run($_SERVER['argv'], $exit); } Modified: trunk/phase3/tests/phpunit/suite.xml =================================================================== --- trunk/phase3/tests/phpunit/suite.xml 2011-08-16 18:16:40 UTC (rev 94672) +++ trunk/phase3/tests/phpunit/suite.xml 2011-08-16 18:23:13 UTC (rev 94673) @@ -2,7 +2,7 @@ <!-- colors don't work on Windows! --> <phpunit bootstrap="./bootstrap.php" - colors="false" + colors="true" backupGlobals="false" convertErrorsToExceptions="true" convertNoticesToExceptions="true" _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs