Page MenuHomePhabricator

MWException from line 25 of /workspace/src/tests/phpunit/suites/ParserTestFileSuite.php: /workspace/src/extensions/Graph/tests/parser/parserTests.txt: Expected [^\n], "\n" or "!!" but end of input found.
Closed, ResolvedPublic

Description

Seen at https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php72-noselenium-docker/30234/console, from https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GrowthExperiments/+/620902

12:27:50 INFO:quibble.commands:php tests/phpunit/phpunit.php --testsuite extensions --exclude-group Broken,ParserFuzz,Stub,Database,Standalone --log-junit /workspace/log/junit-dbless.xml
12:27:50 Using PHP 7.2.31-1+0~20200514.41+debian9~1.gbpe2a56b+wmf1
12:27:53 MWException from line 25 of /workspace/src/tests/phpunit/suites/ParserTestFileSuite.php: /workspace/src/extensions/Graph/tests/parser/parserTests.txt: Expected [^\n], "\n" or "!!" but end of input found.
12:27:53 #0 /workspace/src/tests/phpunit/suites/ParserTestTopLevelSuite.php(138): ParserTestFileSuite->__construct(Object(ParserTestRunner), 'ParserTest_Grap...', '/workspace/src/...')
12:27:53 #1 /workspace/src/tests/phpunit/suites/ParserTestTopLevelSuite.php(67): ParserTestTopLevelSuite->__construct(2)
12:27:53 #2 /workspace/src/tests/phpunit/suites/ExtensionsParserTestSuite.php(8): ParserTestTopLevelSuite::suite(2)
12:27:53 #3 [internal function]: ExtensionsParserTestSuite::suite('ExtensionsParse...')
12:27:53 #4 /workspace/src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(433): ReflectionMethod->invoke(NULL, 'ExtensionsParse...')
12:27:53 #5 /workspace/src/vendor/phpunit/phpunit/src/Util/Configuration.php(1035): PHPUnit\Framework\TestSuite->addTestFile('/workspace/src/...')
12:27:53 #6 /workspace/src/vendor/phpunit/phpunit/src/Util/Configuration.php(881): PHPUnit\Util\Configuration->getTestSuite(Object(DOMElement), Array)
12:27:53 #7 /workspace/src/vendor/phpunit/phpunit/src/TextUI/Command.php(929): PHPUnit\Util\Configuration->getTestSuiteConfiguration('extensions')
12:27:53 #8 /workspace/src/vendor/phpunit/phpunit/src/TextUI/Command.php(171): PHPUnit\TextUI\Command->handleArguments(Array)
12:27:53 #9 /workspace/src/tests/phpunit/phpunit.php(75): PHPUnit\TextUI\Command->run(Array, true)
12:27:53 #10 /workspace/src/maintenance/doMaintenance.php(107): PHPUnitMaintClass->execute()
12:27:53 #11 /workspace/src/tests/phpunit/phpunit.php(134): require('/workspace/src/...')
12:27:53 #12 {main}

Event Timeline

kostajh created this task.Aug 18 2020, 10:59 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 18 2020, 10:59 AM

Oops, we just changed this slightly to use only one code path. CC @cscott

Should have been fixed by https://gerrit.wikimedia.org/r/c/mediawiki/services/parsoid/+/618372 but @cscott knows better. Easiest way to fix for now is by adding a new line at the end of the file.

Change 620963 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/Graph@master] Normalize parserTests.txt format

https://gerrit.wikimedia.org/r/620963

Easiest way to fix for now is by adding a new line at the end of the file.

I don't think that was it. Instead, the last !! end directive was preceded by a space, which apparently used to be tolerated but isn't anymore.

Easiest way to fix for now is by adding a new line at the end of the file.

I don't think that was it. Instead, the last !! end directive was preceded by a space, which apparently used to be tolerated but isn't anymore.

Ah, okay ... mine was a lazy diagnosis without actually looking at the file. +2ed your patch. And as I noted there, if this is a problem with more files than this one, we can update the grammar to accept whitespace before directives.

Change 620963 merged by jenkins-bot:
[mediawiki/extensions/Graph@master] Normalize parserTests.txt format

https://gerrit.wikimedia.org/r/620963

I'm not surprised we're seeing a bunch of one-off issues with the new parsertests parser, but I would be surprised if there were a lot of one type. So far it's been a bunch of different weirdnesses which were never noticed before. Anyway, it's in the relnotes and i'm happy to help fix eccentric parsertests.

Change 620978 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/Graph@wmf/1.36.0-wmf.5] Normalize parserTests.txt format

https://gerrit.wikimedia.org/r/620978

Change 620978 merged by jenkins-bot:
[mediawiki/extensions/Graph@wmf/1.36.0-wmf.5] Normalize parserTests.txt format

https://gerrit.wikimedia.org/r/620978

cscott closed this task as Resolved.Aug 26 2020, 5:05 PM
cscott claimed this task.
ssastry reassigned this task from cscott to Catrope.Aug 26 2020, 7:56 PM