On 04/04/2012 05:00 PM, Noel Grandin wrote:
I've converted a bunch of stuff, including graphic/GraphicProvider. I'm
now getting failures in some of the unit tests.
Are my changes at fault, or is there something else that needs fixing?
Thanks, Noel Grandin
File tested,Test Result,Execution Time (ms)
file:///home/noel/libo/sc/qa/unit/data/xls/pass/CVE-2010-0822-1.xls,##Failure
Location unknown## : Error
Test name: ScFiltersTest::testCVEs
An uncaught exception of type com.sun.star.uno.DeploymentException
- component context fails to supply service
com.sun.star.graphic.GraphicProvide
r of type com.sun.star.graphic.XGraphicProvider
[...]
[/home/noel/libo/workdir/unxlngx6.pro/CppunitTest/sc_filters_test.test]
From a very quick glance: Many of our "unit tests" have the problem
that they need a rather extensive environment set up, with many UNO
services available, but they set that up manually. Now, due to lots of
that pseudo-defensiveness nonsense in the code base we already
discussed, missing pieces in those test environments often went undetected.
I assume that adding svtools/util/svt to the
gb_CppunitTest_add_components list in sc/CppunitTest_sc_filters_test
solves this specific problem.
If yes, the general pattern is: If there's a DeplyomentException about
a missing service from a test, look that service up in
program/services/services.rdb or ure/share/misc/services.rdb, note which
component provides it, from the component's uri attribute learn which
dynamic library that would be, and check that the test's mk file
gb_CppunitTest_add_components list mentions that library's .component file.
Stephan
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.