Page MenuHomePhabricator

Lingo tests are failing on PHP 5.5 but pass in HHVM
Closed, InvalidPublic

Event Timeline

Legoktm created this task.Dec 10 2017, 11:13 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 10 2017, 11:13 PM

It's doing fine: https://travis-ci.org/wikimedia/mediawiki-extensions-Lingo/builds/314503631

(I'll be happy to review and merge patches that integrate Lingo with the WMF CI environment, but I will not work on it myself.)

Unrelatedly, that doesn't seem like it's running the full suite of tests, is it? At first glance I don't think it's running the structure tests. I don't know if it's possible to see the full breakdown of tests that were run like jenkins can?

Depends on what you consider the full suite. After everything is set up on Travis it runs php ../../tests/phpunit/phpunit.php --group extensions-lingo -c phpunit.xml.dist, i.e. everything from the extension-lingo group. This includes integration testing from Lingo\Tests\Integration\ArticleAnnotationTest. See Lingo/build/travis/script.sh for details.

To get the full list of tests you could run phpunit locally: php ../../tests/phpunit/phpunit.php --group extensions-lingo -c phpunit.xml.dist --debug

The result should be something like this

Using PHP 7.0.22-0ubuntu0.16.04.1

Using the MediaWiki vendor autoloader ...

PHPUnit 4.8.36 by Sebastian Bergmann and contributors.

Runtime:	PHP 7.0.22-0ubuntu0.16.04.1 with Xdebug 2.4.0
Configuration:	/home/stephan/website/mw/extensions/Lingo/phpunit.xml.dist


Starting test 'Lingo\Tests\Integration\ArticleAnnotationTest::testArticleAnnotation with data set #0 ('/simple.xml', '\n\nlorem\nLorem\nipsüm\ndolor sit...3xt\n\n	', array(array('lorem', 'lorem-def', null, null), array('ipsüm', 'ipsüm-def', null, null), array('dolor sit', 'dolor sit-def', null, null), array('हीकम', 'हीकम-def', null, null), array('他携', '他携-def', null, null), array('d4 t3xt', 'd4 t3xt-def', null, null), array('d4', 'd4-def', null, null)), '\n\n<span class="mw-lingo-toolt...an>\n\n	')'.
.
Starting test 'Lingo\Tests\Integration\ArticleAnnotationTest::testArticleAnnotation with data set #1 ('/latin.xml', '\n\nLorem ipsum dolor sit amet,...ta.\n\n	', array(array('ipsum', 'ipsum-def', null, null), array('vel', 'vel-def', null, null), array('vel', 'vel-def', null, null), array('mandamus', 'mandamus-def', null, null), array('ius', 'ius-def', null, null), array('modus', 'modus-def', null, null), array('omnes', 'omnes-def', null, null), array('has', 'has-def', null, null)), '\n\nLorem <span class="mw-lingo...ta.\n\n	')'.
.
Starting test 'Lingo\Tests\Integration\ArticleAnnotationTest::testArticleAnnotation with data set #2 ('/cyrillic.xml', '\n\nЭю элььэефэнд торквюатоз хё...эи.\n\n	', array(array('торквюатоз', 'торквюатоз-def', null, null), array('декам', 'декам-def', null, null), array('мёнём', 'мёнём-def', null, null), array('но', 'но-def', null, null)), '\n\nЭю элььэефэнд <span class="...эи.\n\n	')'.
.
Starting test 'Lingo\Tests\Integration\ArticleAnnotationTest::testArticleAnnotation with data set #3 ('/html.xml', '\n\n<p>In <a href="/wiki/Publis.../p>\n\n	', array(array('publishing', 'publishing-def', null, null), array('layout', 'layout-def', null, null), array('mid-1980s', 'mid-1980s-def', null, null), array('title', 'title-def', null, null), array('sup', 'sup-def', null, null), array('<p>', '<p>', null, null), array('quickly-generated', 'quickly-generated-def', null, null)), '\n\n<p>In <a href="/wiki/Publis.../p>\n\n	')'.
.
Starting test 'Lingo\Tests\Unit\BackendTest::testGetMessageLog_withLogGivenToConstructor'.
.
Starting test 'Lingo\Tests\Unit\BackendTest::testGetMessageLog_withoutLogGivenToConstructor'.
.
Starting test 'Lingo\Tests\Unit\BackendTest::testUseCache'.
.
Starting test 'Lingo\Tests\Unit\BackendTest::testSetGetLingoParser'.
.
Starting test 'Lingo\Tests\Unit\BackendTest::testGetLingoParser_withoutParserGiven'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testCanConstruct'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testPurgeCache'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testUseCache'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testNext with data set #0 ('', array(null))'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testNext with data set #1 (';CIP:Common image point\n;CMP:...dpoint', array(array('CMP', 'Common midpoint', null, null), array('CIP', 'Common image point', null, null)))'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testNext with data set #2 (';CIP\n:Common image point\n;CMP...dpoint', array(array('CMP', 'Common midpoint', null, null), array('CIP', 'Common image point', null, null)))'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testNext with data set #3 (';CIP\n;CMP\n:Common midpoint', array(array('CMP', 'Common midpoint', null, null), array('CIP', 'Common midpoint', null, null)))'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testNext with data set #4 (';CIP\n:Common image point\n:Com...dpoint', array(array('CIP', 'Common image point', null, null), array('CIP', 'Common midpoint', null, null)))'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testNext with data set #5 (';CIP\n;CMP\n:Common image point...dpoint', array(array('CMP', 'Common image point', null, null), array('CMP', 'Common midpoint', null, null), array('CIP', 'Common image point', null, null), array('CIP', 'Common midpoint', null, null)))'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testNext with data set #6 (';CIP:Common image point\n; CMP...ve-out', array(array('NMO', 'Normal move-out', null, null), array('DMO', 'Dip move-out', null, null), array('DIMO', 'Dip move-out', null, null), array('CMP', 'Common midpoint', null, null), array('CIP', 'Common image point', null, null)))'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testNext_LingoPageIsInterwiki'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testNext_LingoPageWasJustEdited'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testNext_LingoPageDoesNotExist'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testNext_LingoPageNotAccessible'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testNext_LingoPageIsNotATextPage'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testNext_ApprovedRevsEnabledButNotInstalled'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testNext_ApprovedRevsEnabledAndInstalled'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testGetMessageLog_withLogGivenToConstructor'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testGetMessageLog_withoutLogGivenToConstructor'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testSetGetLingoParser'.
.
Starting test 'Lingo\Tests\Unit\BasicBackendTest::testGetLingoParser_withoutParserGiven'.
.
Starting test 'Lingo\Tests\Unit\ElementTest::testCanConstruct'.
.
Starting test 'Lingo\Tests\Unit\LingoI18NTest::testJsonSchemaValidatorExists'.
.
Starting test 'Lingo\Tests\Unit\LingoI18NTest::testMagicWordsLoaded'.
.
Starting test 'Lingo\Tests\Unit\LingoParserTest::testCanConstruct'.
.
Starting test 'Lingo\Tests\Unit\MessageLogTest::testCanConstruct'.
.
Starting test 'Lingo\Tests\Unit\TreeTest::testCanConstruct'.
.

Time: 393 ms, Memory: 32.00MB

OK (36 tests, 71 assertions)

One thing is certain: 27% coverage is not great.

OK, so that means it's not running all of the tests in https://phabricator.wikimedia.org/source/mediawiki/browse/master/tests/phpunit/structure/ which are meant for extensions.

Interesting. Is there more documentation available? A quick search on mw.o didn't find anything.

Krinkle added a subscriber: Krinkle.

Untagging "Wikimedia-log-errors (Jenkins Failure)", this does not affect other projects and can be tracked as an issue under the individual project only.

Krinkle removed a subscriber: Krinkle.Apr 14 2018, 12:38 AM
Kizule closed this task as Invalid.Jul 11 2020, 1:19 PM
Kizule added a subscriber: Kizule.

We don't support PHP 5.5 nor HHVM anymore, so I'm closing this task as invalid.