On Thu, May 23, 2013 at 1:59 PM, Arthur Richards <[email protected]>wrote:

> In trying to submit https://gerrit.wikimedia.org/r/#/c/63907/18, I get a
> Jenkins build failure due to PHPUnit failing, due to a Fatal being thrown:
>
> https://integration.wikimedia.org/ci/job/mwext-MobileFrontend-testextensions-master/898/console
>
> The fatal:
>
> PHP Fatal error:  Class 'MFMockRevision' not found in 
> /srv/ssd/jenkins/workspace/mwext-MobileFrontend-testextensions-master/extensions/MobileFrontend/tests/MobileContextTest.php
>  on line 500
>
>
> The thing is, 'MFMockRevision' should be made available by it's file being 
> included in efExtMobileFrontendUnitTests() (our hook handler for 
> UnitTestsList.
>
>
> Unit tests execute fine for me and at least one other person on the mobile 
> team. I do not want to manually merge that patchset since I imagine it would 
> cause build failures on subsequent patchset +2's. Anyone know what might be 
> going on?
>
>
> --
> Arthur Richards
> Software Engineer, Mobile
> [[User:Awjrichards]]
> IRC: awjr
> +1-415-839-6885 x6687
>

After some digging it became obvious that adding classes that are not test
cases using 'UnitTestsList' just doesn't work since PHPUnit will only
actually add the files that contain test cases. I instead tried using
$wgAutoloadClasses inside of efExtMobileFrontendUnitTests() to load the
extra helper class, but that didn't seem to work either :( Ultimately, I
rewrote how the tests work and merged the helper class into the same file
containing the test case that relied on it. But for the future, is there a
better way to include arbitrary, non-PHPUnit test case classes in test runs?

-- 
Arthur Richards
Software Engineer, Mobile
[[User:Awjrichards]]
IRC: awjr
+1-415-839-6885 x6687
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to