tests: let us select/exclude ParserTests
authorAntoine Musso <hashar@free.fr>
Thu, 26 Nov 2015 20:25:03 +0000 (21:25 +0100)
committerHashar <hashar@free.fr>
Tue, 1 Dec 2015 12:26:10 +0000 (12:26 +0000)
commit50c5a9d27d9f254ef95247ce2784de83970532a4
tree0db923530d6303742f12c2f6bd90372d7f2fb7b0
parent9cfb9cb9fba4dcfd25a0924237681b7cc86a20df
tests: let us select/exclude ParserTests

The MediaWiki test suite is painfully slow and delays merging of
changes. More than half of the time is spent in
ParserTest_Parser⁄parserTests::testParserTest which is the PHPUnit
wrapping class for the parser tests.

This patch let us extract the parser tests so we can run them
independently. By running them parallely with the rest of the tests,
that will speed up the gate processing time.

Mark the MediaWikiParserTest and NewParserTest class as belonging to the
test group 'ParserTests'.  Will let us filter them out via PHPUnit
option --exclude-group

Introduce a new PHPUnit test suite 'parsertests' which loads the
MediaWiki core parser tests wrapper 'MediaWikiParserTest' and the suite
which loads the extensions parser tests (ExtensionsParserTestSuite.php).
This way we can run solely the parser tests with:

  cd tests/phpunit
  php phpunit.php --testsuite ParserTests

Wikimedia CI can then be configure to run two jobs:

 A) php phpunit.php --exclude-group ParserTests
 B) php phpunit.php --testsuite ParserTests

Bug: T114314
Change-Id: Ie819bab43163995048c073691c4c5d258f797c02
tests/phpunit/includes/parser/MediaWikiParserTest.php
tests/phpunit/includes/parser/NewParserTest.php
tests/phpunit/suite.xml