Page MenuHomePhabricator

Math related Debian packages needed to test coverage of extension math
Closed, ResolvedPublic

Description

Author: physik

Description:
Recent deployments of changes made to the math extension demonstrate that a better test coverage is needed.
In the context of the MathSearch extension I created scripts for the automated creation of parser tests, based on sample renderings.
At some point in time jenkins stopped to run the parser tests for the extension math. Is that a temporary bug, or are parser tests deprecated.

I would prefere to (kind of abuse) phpunit tests for that rather than parser tests. i.e. they are easier to maintain and can produce better error messages.


Version: master
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=66807

Details

Reference
bz61090

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 2:52 AM
bzimport added a project: Math.
bzimport set Reference to bz61090.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Feb 8 2014, 2:04 PM

Change 112354 had a related patch set uploaded by Physikerwelt:
Test case generator

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

Change 112354 merged by Physikerwelt:
Test case generator

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

physik wrote:

.. mh I could not find a way to run the tests at jenkins. Locally the 387 tests run without problems and take about two minutes.
https://gerrit.wikimedia.org/r/#/c/112353/1

physik wrote:

Now almost everything works with jenkins. Only the texvc executable is missing at jenkins. If jenkins was using vagrant we could simply enable the math role.

physik wrote:

Here the link to the dataset used for the test generation. Feel free to change the page...
https://www.mediawiki.org/w/index.php?title=Extension:Math/CoverageTest

physik wrote:

Now I'm waiting for a code review.
I don't want to add reviewers to the list that don't want to do a review. So I have left the list empty for now. Otherwise the status
Review in Progress
is misleading because it might indicate that somone is working on the code review.

Change 114154 had a related patch set uploaded by Hashar:
Compile texvc in testsuite

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

Change 114154 merged by jenkins-bot:
Compile texvccheck in testsuite

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

Change 112353 had a related patch set uploaded by Physikerwelt:
Coverage tests for the Math extension

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

physik wrote:

It's almost done.
Two things are still missing:

  1. Jenkins fails to render some special commands like

\Coppa\coppa\varcoppa see https://integration.wikimedia.org/ci/job/mwext-Math-testextensions-master/656/console
I think this requires an extra latex package

  1. I could not find a way to remove the lik to the old parser tests.

00:02:10.855 The data provider specified for MathParserTests::testParserTest is invalid.
00:02:10.856 Couldn't open file '/srv/ssd/jenkins-slave/workspace/mwext-Math-testextensions-master/extensions/Math/mathParserTests.txt'

  1. \Coppa\coppa\varcoppa unrecognized

I think this requires an extra latex package

I have installed texlive-latex-recommended which seems to be the one used in production. Might need something else?

Apparently \Coppa was added by https://www.mediawiki.org/wiki/Special:Code/MediaWiki/97014 for bug 27754. The commit message mention texlive-lang-greek which is not installed :/

We are also missing dvipng

In production the dependencies are provided by wikimedia-task-appserver which we can't install because it provides a bunch of packages we dont want (e.g.: php-apc).

On Jenkins slaves we would want to add: dvipng texlive-lang-all . Should be done in modules/contint/manifests/packages.pp

  1. I could not find a way to remove the lik to the old parser tests.

00:02:10.855 The data provider specified for MathParserTests::testParserTest is invalid.
00:02:10.856 Couldn't open file '/srv/ssd/jenkins-slave/workspace/mwext-Math-testextensions-master/extensions/Math/mathParserTests.txt'

If those are no more valid, I guess we want to delete the file mathParserTests.txt and unregister it:

$ git grep mathParserTests
Math.php:$wgParserTestFiles[] = $dir . 'mathParserTests.txt';
$

physik wrote:

(In reply to Antoine "hashar" Musso from comment #11)

  1. \Coppa\coppa\varcoppa unrecognized

I think this requires an extra latex package

I have installed texlive-latex-recommended which seems to be the one used in
production. Might need something else?
Apparently \Coppa was added by
https://www.mediawiki.org/wiki/Special:Code/MediaWiki/97014 for bug 27754.
The commit message mention texlive-lang-greek which is not installed :/

If you look at the output it seems that this is the only pacakge which is still missing. Only 5 of 478 test failed

We are also missing dvipng

Why do you think so?

In production the dependencies are provided by wikimedia-task-appserver
which we can't install because it provides a bunch of packages we dont want
(e.g.: php-apc).
On Jenkins slaves we would want to add: dvipng texlive-lang-all . Should be
done in modules/contint/manifests/packages.pp

Yes. I hope texvlive-lang-all includes teubner.sty

  1. I could not find a way to remove the lik to the old parser tests.

00:02:10.855 The data provider specified for MathParserTests::testParserTest is invalid.
00:02:10.856 Couldn't open file '/srv/ssd/jenkins-slave/workspace/mwext-Math-testextensions-master/extensions/Math/mathParserTests.txt'

If those are no more valid, I guess we want to delete the file
mathParserTests.txt and unregister it:
$ git grep mathParserTests
Math.php:$wgParserTestFiles[] = $dir . 'mathParserTests.txt';
$

Ah thank you. I just deleted everything but the test that tests math in HTML comments. However, I think that is unrelated to the math extension and should be moved to another place were parser tests are done.

physik wrote:

@hashar: Could you add texlive-lang-greek to the jenkins packages?

Change 115102 had a related patch set uploaded by Physikerwelt:
Add texlive-lang-greek

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

Change 115133 had a related patch set uploaded by Hashar:
Describe Math related packages in a class

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

Change 115135 had a related patch set uploaded by Hashar:
Move math related packages to a puppet class

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

Change 115102 abandoned by Physikerwelt:
Add texlive-lang-greek

Reason:
See Ifcf184b2f016f3dab6a1d32feab4162b7de51ca6

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

I have manually installed the texlive packages on both Jenkins CI slaves gallium and lanthanum using:

apt-get install dvipng gsfonts texlive texlive-bibtex-extra texlive-font-utils texlive-fonts-extra texlive-lang-croatian texlive-lang-cyrillic texlive-lang-czechslovak texlive-lang-danish texlive-lang-dutch texlive-lang-finnish texlive-lang-french texlive-lang-german texlive-lang-greek texlive-lang-hungarian texlive-lang-italian texlive-lang-latin texlive-lang-mongolian texlive-lang-norwegian texlive-lang-other texlive-lang-polish texlive-lang-portuguese texlive-lang-spanish texlive-lang-swedish texlive-lang-vietnamese texlive-latex-extra texlive-math-extra texlive-pictures texlive-pstricks texlive-publishers

That is essentially doing the same as applying the mediawiki::packages::math puppet class proposed by Gerrit change #115133

Patchset 17 of https://gerrit.wikimedia.org/r/#/c/112353/ (Math extension) pass the tests http://integration.wikimedia.org/ci/job/mwext-Math-testextensions-master/663/

I guess we can close this bug, will make sure puppet/debian packages get reviewed and applied by ops. The changes are under my Gerrit dashboard :-]

physik wrote:

Maybe keeping the bug open helps to get code review for
https://gerrit.wikimedia.org/r/#/c/112353/?
Otherwise we can close it.

(In reply to physikerwelt from comment #20)

Maybe keeping the bug open helps to get code review for
https://gerrit.wikimedia.org/r/#/c/112353/?
Otherwise we can close it.

Whatever works for you :-] If there is any more troubles with tests you can always fill a new bug or reopen this one.

physik wrote:

If someone wants to do a code review, please add yourself as reviewer:
https://gerrit.wikimedia.org/r/#/c/112353/

Change 112353 merged by jenkins-bot:
Coverage tests for the Math extension

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

I think this is completed. Moving to Math extension component for confirmation.

Change 115133 abandoned by Hashar:
Describe Math related packages in a class

Reason:
The Math related packages are only needed on gallium/lanthanum and I installed them manually back in July.

I am abandoning both bit rotting Gerrit changes ( https://gerrit.wikimedia.org/r/#/c/115133/ and https://gerrit.wikimedia.org/r/#/c/115135/ ) since they clutter my Gerrit dashboard and is there no interest in migrating from wikimedia-task-appserver to puppet manifests).

I have reopened bug 61090 with lowest priority mentioning the packages still need to be migrated to puppet.

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

Change 115135 abandoned by Hashar:
Move math related packages to a puppet class

Reason:
The Math related packages are only needed on gallium/lanthanum and I installed them manually back in July.

I am abandoning both bit rotting Gerrit changes ( https://gerrit.wikimedia.org/r/#/c/115133/ and https://gerrit.wikimedia.org/r/#/c/115135/ ) since they clutter my Gerrit dashboard and is there no interest in migrating from wikimedia-task-appserver to puppet manifests).

I have reopened bug 61090 with lowest priority mentioning the packages still need to be migrated to puppet.

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

I have abandoned the Gerrit changes that migrated the Math packages definition from wikimedia-task-appserver to puppet. Thus reopening and slightly rephrasing this bug as a remember to do the migration.

As a workaround, back in July, I have manually installed packages on both production slave servers gallium and lanthanum.

demon removed a subscriber: demon.Mar 9 2017, 9:42 PM
Physikerwelt closed this task as Resolved.May 29 2018, 2:16 PM
Physikerwelt claimed this task.