Last modified: 2014-09-23 19:33:33 UTC
make safe php phpunit.php --configuration /www/dev.translatewiki.net/w/tests/phpunit/suite.xml --exclude-group Broken,ParserFuzz,Destructive,Stub PHPUnit 3.7.8 by Sebastian Bergmann. Configuration read from /www/dev.translatewiki.net/w/tests/phpunit/suite.xml E.................SSSSS.....F Fatal error: Cannot redeclare class SiteStats in /www/dev.translatewiki.net/w/includes/SiteStats.php on line 26 make: *** [safe] Error 255
* There is only one match for declaration of class SiteStats in mediawiki/core (namely includes/SiteStats.php) * The file is in AutoLoader * The file is not manually included from anywhere else So I can only guess this is a fault in an extension or local settings?
Maybe it was APC. Now the error is different: twn:/www/dev.translatewiki.net/w/tests/phpunit (master)$ make safe php phpunit.php --configuration /www/dev.translatewiki.net/w/tests/phpunit/suite.xml --exclude-group Broken,ParserFuzz,Destructive,Stub PHPUnit 3.7.8 by Sebastian Bergmann. Configuration read from /www/dev.translatewiki.net/w/tests/phpunit/suite.xml ..................SSSSS.....FFFFF. Catchable fatal error: Argument 2 passed to Parser::parse() must be an instance of Title, null given, called in /www/dev.translatewiki.net/w/includes/OutputPage.php on line 1484 and defined in /www/dev.translatewiki.net/w/includes/parser/Parser.php on line 346 make: *** [safe] Error 255
Git bisect gives I8f23c6535f7b3ee6462d9c5a19dd06070e77f9d1 as the cause.
I8f23c6535 Introduces new tests for EditPage. It does not touch existing code. I have no idea how that could cause this bug.
Can you possibly catch the error and give out a full stack trace? Also it would be helpful to get the name of test failing. Either look it up in the debug log or catch the error and dump a stack trace.
/www/dev.translatewiki.net/w/includes/OutputPage.php:1475 /www/dev.translatewiki.net/w/includes/OutputPage.php:1426 /www/dev.translatewiki.net/w/extensions/ConfirmEdit/Captcha.php:59 /www/dev.translatewiki.net/w/includes/EditPage.php:2049 /www/dev.translatewiki.net/w/extensions/ConfirmEdit/Captcha.php:472 /www/dev.translatewiki.net/w/extensions/ConfirmEdit/Captcha.php:485 /www/dev.translatewiki.net/w/extensions/ConfirmEdit/ConfirmEditHooks.php:23 /www/dev.translatewiki.net/w/includes/Hooks.php:253 /www/dev.translatewiki.net/w/includes/GlobalFunctions.php:3815 /www/dev.translatewiki.net/w/includes/EditPage.php:1389 /www/dev.translatewiki.net/w/tests/phpunit/includes/EditPageTest.php:151 /www/dev.translatewiki.net/w/tests/phpunit/includes/EditPageTest.php:393 /www/dev.translatewiki.net/w/tests/phpunit/MediaWikiTestCase.php:87 /www/dev.translatewiki.net/w/tests/phpunit/MediaWikiPHPUnitCommand.php:45 Was a bit tricky to catch because of bug 41491.
So... the edit page test fails if it triggers a captcha?
Looks like it.
Since that seems to be caused by ConfirmEdit extension, I am changing the component.
Given it was introduced in https://gerrit.wikimedia.org/r/#/c/29973/ I was hoping we could find fixers from there. In any case this bug should be assigned to someone asap.
leucosticte and Martineznovo, could you take a look at this?
Sorry Sumana but I know nothing about this, I can't help :( [removing myself from cc]
Setting $wgTitle in EditPageTest::assertEdit works, but sounds not like a real solution You need one of: $wgCaptchaTriggers['edit'] = true; $wgCaptchaTriggers['create'] = true; to trigger the error (now the exception)
(In reply to db from comment #13) > Setting $wgTitle in EditPageTest::assertEdit works, but sounds not like a > real solution > > You need one of: > > $wgCaptchaTriggers['edit'] = true; > $wgCaptchaTriggers['create'] = true; So we should just set $wgCaptchaTriggers false in EditPageTest::assertEdit, as that's what the test currently assumes. Right?