wiki.techinc.nl/tests/phpunit/suite.xml
Antoine Musso 50c5a9d27d 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
2015-12-01 12:26:10 +00:00

70 lines
2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Colors don't work on Windows!
phpunit.php enables colors for other OSs at runtime
-->
<phpunit bootstrap="./bootstrap.php"
colors="false"
backupGlobals="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="true"
stopOnFailure="false"
timeoutForSmallTests="10"
timeoutForMediumTests="30"
timeoutForLargeTests="60"
strict="true"
verbose="true">
<testsuites>
<testsuite name="includes">
<directory>includes</directory>
</testsuite>
<testsuite name="languages">
<directory>languages</directory>
</testsuite>
<testsuite name="parsertests">
<file>includes/parser/MediaWikiParserTest.php</file>
<file>suites/ExtensionsParserTestSuite.php</file>
</testsuite>
<testsuite name="skins">
<directory>skins</directory>
<directory>structure</directory>
<file>suites/LessTestSuite.php</file>
</testsuite>
<!-- As there is a class Maintenance, we cannot use the
name "maintenance" directly -->
<testsuite name="maintenance_suite">
<directory>maintenance</directory>
</testsuite>
<testsuite name="structure">
<directory>structure</directory>
</testsuite>
<testsuite name="uploadfromurl">
<file>suites/UploadFromUrlTestSuite.php</file>
</testsuite>
<testsuite name="extensions">
<directory>structure</directory>
<file>suites/ExtensionsTestSuite.php</file>
<file>suites/ExtensionsParserTestSuite.php</file>
<file>suites/LessTestSuite.php</file>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>Utility</group>
<group>Broken</group>
<group>ParserFuzz</group>
<group>Stub</group>
</exclude>
</groups>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">../../includes</directory>
<directory suffix=".php">../../languages</directory>
<directory suffix=".php">../../maintenance</directory>
<directory suffix=".php">../../skins</directory>
</whitelist>
</filter>
</phpunit>