Page MenuHomePhabricator

Jenkins unit tests for ParserFunctions should set $wgPFEnableStringFunctions = true;
Closed, ResolvedPublic


Jenkins runs unit tests without setting $wgPFEnableStringFunctions = true; This triggers all the parser tests for string functions to be skipped. Skipping all unit tests in a test suite cause the unit tests to fail.

02:41:51 There was 1 failure:
02:41:51 1) Warning
02:41:51 No tests found in suite "StringFunctionTests::testParserTest".

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:56 AM
bzimport set Reference to bz61410.

Change 113945 had a related patch set uploaded by 01tonythomas:
Added the $wgPFEnableStringFunctions = true in ParserFunctions tests

tonythomas01 / Gloria pinged me today and I suddenly remembered that our Jenkins job have a special global setting set when running jobs:

$wgWikimediaJenkinsCI = true;

Using that, the ParserFunctions.php entry point can be hacked to set the $wgPFEnableStringFunctions global variable, i.e. something like:

if ( $wgWikimediaJenkinsCI === true ) {

$wgPFEnableStringFunctions = true;


Change 113945 merged by jenkins-bot:
Added the $wgPFEnableStringFunctions = true in ParserFunctions tests

All parser tests are now being triggered AND they are passing \O/

Better approach would maybe to have phpunit set a define somewhere when running tests (if it doesnt already) and look for that