Kaydet (Commit) 0b5568b9 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix CppunitTest_services on Windows

...by blacklisting the problematic service

Change-Id: I524a7c7af2cb374911db7b204021c3d2bcd1fdd6
üst c4444ea0
......@@ -28,9 +28,8 @@ $(eval $(call gb_Module_add_targets,postprocess,\
))
endif
$(if $(filter-out $(OS),WNT), \
$(eval $(call gb_Module_add_check_targets,postprocess,\
CppunitTest_services \
)))
))
# vim: set noet sw=4 ts=4:
......@@ -9,6 +9,7 @@
#include <sal/config.h>
#include <algorithm>
#include <vector>
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
......@@ -36,6 +37,25 @@ public:
void ServicesTest::test()
{
std::vector<OUString> blacklist;
#if defined WNT
// On Windows, blacklist the com.sun.star.report.ReportDefinition service,
// as its reportdesign::OReportDefinition implementation (in
// reportdesign/source/core/api/ReportDefinition.cxx) spawns a thread that
// forever blocks in SendMessageW when no VCL event loop is running
// (reportdesign::<anon>::FactoryLoader::execute ->
// framework::Desktop::findFrame -> framework::TaskCreator::createTask ->
// <anon>::TaskCreatorService::createInstanceWithArguments ->
// <anon>::TaskCreatorService::impls_createContainerWindow ->
// <anon>::VCLXToolkit::createWindow ->
// <anon>::VCLXToolkit::ImplCreateWindow ->
// <anon>::VCLXToolkit::ImplCreateWindow -> WorkWindow::WorkWindow ->
// WorkWindow::ImplInit -> ImplBorderWindow::ImplBorderWindow ->
// ImplBorderWindow::ImplInit -> Window::ImplInit ->
// WinSalInstance::CreateFrame -> ImplSendMessage -> SendMessageW):
blacklist.push_back("com.sun.star.report.ReportDefinition");
#endif
Reference< XHierarchicalNameAccess > xTypeManager(
m_xContext->getValueByName(
"/singletons/com.sun.star.reflection.theTypeDescriptionManager"),
......@@ -44,6 +64,11 @@ void ServicesTest::test()
std::vector< css::uno::Reference<css::lang::XComponent> > comps;
for (sal_Int32 i = 0; i < s.getLength(); i++)
{
if (std::find(blacklist.begin(), blacklist.end(), s[i])
!= blacklist.end())
{
continue;
}
if (!xTypeManager->hasByHierarchicalName(s[i]))
{
SAL_WARN(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment