https://bugzilla.wikimedia.org/show_bug.cgi?id=42506

Antoine "hashar" Musso <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|[email protected]. |[email protected]
                   |org                         |

--- Comment #6 from Antoine "hashar" Musso <[email protected]> ---
So Wikibase has most probably been hit by that bug.  Below is my mail
summarizing it:


 A few months ago Merlijn noticed an issue with the LabeledSectionTransclusion
extension for which parser tests were not triggered.  The workaround is to add
a dummy parser tests in the extension as shown at:

  https://gerrit.wikimedia.org/r/#/c/38114/

I have never been happy with that because the parser tests are already
registered in a global variable and the MediaWiki phpunit wrapper is supposed
to find them via the 'extensions' test suite.


The Wikibase issue we have been facing (where Jenkins does not find the
Wikibase test) is most probably related in the sense Jenkins does not find the
tests for Wikibase.


My suspicion is:

Back in the old days I have made phpunit for extensions to be called using the
form:

 php tests/phpunit.php -- extensions/<name of extension>

The point was to only run the tests for the extension, not the full core test
suite since it is sooooo slow.  Ideally we should have used PHPUnit v3.7.x 
--testsuite argument like:

 php tests/phpunit.php --testsuite extensions


That would parse the tests/phpunit/suite.xml and lookup for a testsuite named
'extensions' and in turns load  our wrapper:
  /tests/phpunit/ExtensionsTestSuite.php


When I took over Jenkins, we used PHPUnit v3.6 which did not support
--testsuite so I came with the workaround of passing the paths we want to test.
 The drawback is that it fallback to PHPUnit discovering mechanisme which is to
look for file ending up with Test.php and in turns bypass any test registered
via the global variable.


When running our phpunit wrapper from MediaWiki root directory, it does find
the suite.xml file but since the paths to the suites are relative, it never
loads them.  Hence when invoking:

  php tests/phpunit/phpunit.php --group Wikibase

You get no tests executed.

But running from the phpunit directory it does:

 cd tests/phpunit; php phpunit.php --group Wikibase
 <bunch of tests...>


So theorically Jenkins should be made to use:

 cd tests/phpunit ; php phpunit.php --testsuite extensions


I will play with LabeledSectionTransclusion to fix that.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to