[Libreoffice-commits] core.git: 2 commits - postprocess/CppunitTest_services.mk postprocess/Module_postprocess.mk postprocess/qa
Stephan Bergmann
sbergman at redhat.com
Thu Jun 12 03:29:46 PDT 2014
postprocess/CppunitTest_services.mk | 1 +
postprocess/Module_postprocess.mk | 3 +--
postprocess/qa/services.cxx | 27 +++++++++++++++++++++++++++
3 files changed, 29 insertions(+), 2 deletions(-)
New commits:
commit 0b5568b9ddc2f89a58a76daef0b52bbfadcd6280
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jun 12 12:28:51 2014 +0200
Fix CppunitTest_services on Windows
...by blacklisting the problematic service
Change-Id: I524a7c7af2cb374911db7b204021c3d2bcd1fdd6
diff --git a/postprocess/Module_postprocess.mk b/postprocess/Module_postprocess.mk
index cf42913..5775cfa 100644
--- a/postprocess/Module_postprocess.mk
+++ b/postprocess/Module_postprocess.mk
@@ -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:
diff --git a/postprocess/qa/services.cxx b/postprocess/qa/services.cxx
index a7052c1..706010d 100644
--- a/postprocess/qa/services.cxx
+++ b/postprocess/qa/services.cxx
@@ -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(
commit c4444ea0c412d580a9ff0423bd9fa4d8b535490b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jun 12 12:18:59 2014 +0200
Avoid Solar Mutex deadlocks when disposing services
...as test code using gb_CppunitTest_use_vcl is implicitly run with Solar Mutex locked
Change-Id: I480b4bcce7c6a94922019679099b0883b3ee1030
diff --git a/postprocess/CppunitTest_services.mk b/postprocess/CppunitTest_services.mk
index bdcae7b..08c860e 100644
--- a/postprocess/CppunitTest_services.mk
+++ b/postprocess/CppunitTest_services.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,services, \
cppu \
sal \
test \
+ vcl \
$(gb_UWINAPI) \
))
diff --git a/postprocess/qa/services.cxx b/postprocess/qa/services.cxx
index 2d29e91..a7052c1 100644
--- a/postprocess/qa/services.cxx
+++ b/postprocess/qa/services.cxx
@@ -16,6 +16,7 @@
#include <com/sun/star/reflection/XServiceConstructorDescription.hpp>
#include <com/sun/star/reflection/XServiceTypeDescription2.hpp>
#include <test/bootstrapfixture.hxx>
+#include <vcl/svapp.hxx>
using namespace css::container;
using namespace css::reflection;
@@ -87,6 +88,7 @@ void ServicesTest::test()
}
}
}
+ SolarMutexReleaser rel;
for (std::vector< css::uno::Reference<css::lang::XComponent> >::iterator i(
comps.begin());
i != comps.end(); ++i)
More information about the Libreoffice-commits
mailing list