r94673 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94672‎ | r94673 | r94674 >
Date:18:23, 16 August 2011
Author:hashar
Status:ok (Comments)
Tags:
Comment:
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 (modified) (history)
  • /trunk/phase3/tests/phpunit/suite.xml (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/suite.xml
@@ -2,7 +2,7 @@
33
44 <!-- colors don't work on Windows! -->
55 <phpunit bootstrap="./bootstrap.php"
6 - colors="false"
 6+ colors="true"
77 backupGlobals="false"
88 convertErrorsToExceptions="true"
99 convertNoticesToExceptions="true"
Index: trunk/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php
@@ -17,6 +17,17 @@
1818
1919 public static function main( $exit = true ) {
2020 $command = new self;
 21+
 22+ if( wfIsWindows() ) {
 23+ # Windows does not come anymore with ANSI.SYS loaded by default
 24+ # PHPUnit uses the suite.xml parameters to enable/disable colors
 25+ # which can be then forced to be enabled with --colors.
 26+ # The below code inject a parameter just like if the user called
 27+ # phpunit with a --no-color option (which does not exist). It
 28+ # overrides the suite.xml setting.
 29+ # Probably fix bug 29226
 30+ $command->arguments['colors'] = false;
 31+ }
2132 $command->run($_SERVER['argv'], $exit);
2233 }
2334

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89179enable colors in PHPUnit...hashar18:26, 30 May 2011

Comments

#Comment by Hashar (talk | contribs)   18:24, 16 August 2011

That is for bug 29226.

#Comment by Hashar (talk | contribs)   19:34, 16 August 2011

Thanks for the quick review MaxSem!

Status & tagging log