Disabling ucalc's testFormulaHashAndTag

Markus Mohrhard markus.mohrhard at googlemail.com
Mon Jan 4 03:57:38 PST 2016


Hey Kendy,

I just disabled Test::testFormulaHashAndTag in [1]. I saw some failures
related to it on some of the jenkins builds and was finally able to
reproduce it on my Windows machine. As mentioned in the commit msg the test
only worked on machines that have no OpenCL

A few explanations to the problems that I mention in the commit msg:

1.) Any test that makes an assumption about OpenCL being present should
check that there is actually a valid OpenCL platform as we are otherwise
taking some strange code paths. This test while not directly assuming that
OpenCL is enabled however the assumption is indirectly through the default
value of OpenCL and the blacklisted/whitelisted OpenCL subset.

2.) In general I'm not a fan of changing the configuration in a test. If it
is really necessary it should IMHO be an own test file that only uses this
configuration. If you really want to change the configuration make it
exception safe (like introducing an object that will reset the config in
the destructor) to ensure that all test are always running with the correct
configuration. In a worst case this test would fail and all the other tests
could now fail because of the wrong configuration value which would make
debugging nearly impossible.

3.) That is the actual problem that made the test fail. Changing the
configuration does not mean that we will get a new formula group
interpreter. The formula group interpreter is a global object that needs to
be explicitly changed by calling
FormulaGroupInterpreter::switchOpenCLDevice. That happens if you change the
configuration through the UI but not if you change it through the code.

I hope that you can look at the test and make it work again.

Regards,
Markus

[1]
http://cgit.freedesktop.org/libreoffice/core/commit/?id=f4dc8a869ac49f19c20fc5fa606448e9103726bd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20160104/10e8af81/attachment.html>


More information about the LibreOffice mailing list