r68574 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68573‎ | r68574 | r68575 >
Date:16:19, 25 June 2010
Author:maxsem
Status:ok (Comments)
Tags:
Comment:
Follow-up to r68544: restored the ability to run tests from separate files
Modified paths:
  • /trunk/phase3/maintenance/tests/phpunit (modified) (history)
  • /trunk/phase3/maintenance/tests/phpunit.bat (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/tests/phpunit
@@ -26,9 +26,14 @@
2727
2828 class MWPHPUnitCommand extends PHPUnit_TextUI_Command {
2929 protected function handleCustomTestSuite() {
30 - require( dirname( __FILE__ ) . '/TestFileList.php' );
3130 $suite = new PHPUnit_Framework_TestSuite;
32 - foreach ( $testFiles as $file ) {
 31+ if ( !empty( $this->options[1] ) ) {
 32+ $files = $this->options[1];
 33+ } else {
 34+ require( dirname( __FILE__ ) . '/TestFileList.php' );
 35+ $files = $testFiles;
 36+ }
 37+ foreach ( $files as $file ) {
3338 $suite->addTestFile( $file );
3439 }
3540 $suite->setName( 'MediaWiki test suite' );
Index: trunk/phase3/maintenance/tests/phpunit.bat
@@ -1 +1 @@
2 -@php phpunit
\ No newline at end of file
 2+@php phpunit %1 %2 %3 %4 %5 %6 %7 %8 %9
\ No newline at end of file

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r68544* Removed require/require_once from maintenance scripts where possible, repla...tstarling02:55, 25 June 2010

Comments

#Comment by Tim Starling (talk | contribs)   18:27, 25 June 2010

That feature probably stopped working in r60640, I don't think I did anything to break it. But it's nice to have it, anyway.

#Comment by MaxSem (talk | contribs)   18:33, 25 June 2010

No, I used it after that.

Status & tagging log