need help with unit test and process service factory

Stephan Bergmann sbergman at redhat.com
Fri Sep 28 04:28:10 PDT 2012


On 09/28/2012 01:03 AM, Matúš Kukan wrote:
> I've tried --enable-telepathy again and found out that the unit test
> does not work now.
> After http://cgit.freedesktop.org/libreoffice/core/commit/?id=4917f0ceb2a7b1bb3ba878373f71f38d156278af
> I am getting:
> - Exception while getting config.ini url: null process service factory
> It's from tubes/qa/test_manager.cxx :
> utl::LocalFileHelper::ConvertPhysicalNameToURL

That ConvertPhysicalNameToURL apparently internally calls 
comphelper::getProcessServiceFactory to obtain the process service 
factory; what recently changed with 
<http://cgit.freedesktop.org/libreoffice/core/commit/?id=2a32bf29b98403872235f880e91b1c08cd3d7f68> 
"Make getProcessComponentContext/ServiceFactory throw instead of 
returning null" is that it throws now when the factory is unset (which 
it should never be).

The way CppUnit tests should get the factory set is via the 
unobootstrapprotector that is enabled with gb_CppunitTest_use_ure (cf. 
solenv/gbuild/CppunitTest.mk).  What is unclear to me is whether that 
also requires that your test fixture is derived from 
test::BootstrapFixtureBase (unotest/bootstrapfixturebase.hxx) or whether 
CppUnit::TestFixture suffices.

Stephan


More information about the LibreOffice mailing list