The MediaWiki test suite is painfully slow and delays merging of changes.
A test report for the last successful build is available via: https://integration.wikimedia.org/ci/job/mediawiki-phpunit-zend/lastSuccessfulBuild/testReport/(root)/
What it shows is more than half of the time is spent in ParserTest_Parser⁄parserTests::testParserTest which is the PHPUnit wrapping class for the parser tests.
I believe it is terrible either because the NewParserTests class is horrible or because of all the PHPUnit overhead.
The good old tests/parserTests.php that were the first tests we ever had, is way faster. Less than a minute on my laptop.
So potentially, we could filter out the PHPUnit based class, or even get rid of it since lot of its code has been copy pasted from tests/parserTests.php. To integrate it in Jenkins we would run the usual PHPUnit suite then the old tests/parserTests.php.
This way if other tests are falling, we will not even run the parser tests.
We probably want to test tests/parserTests.php to output JUnit format so it can be recorded by Jenkins. But it is not strictly necessary --quiet suppress success and gives good enough output: