Process all pending events during Cppunit setUp
Larger unit tests collect a lot of events, which are just processed on shutdown. But since the Scheduler is just an unsorted linked list, processing these in order is O(n^2) for lookup, which really adds up, e.g. sw_ooxmlexport8 has 35047 tasks on shutdown. So this just processes all pending events before running each unit test. Also adds missing spellchecking components to some calc tests. Change-Id: Icf12146015afc17a1f52f79c18f248b72650ad46 Reviewed-on: https://gerrit.libreoffice.org/43199 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
This commit is contained in:
@@ -73,6 +73,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_databaserangeobj,\
|
||||
forms/util/frm \
|
||||
framework/util/fwk \
|
||||
i18npool/util/i18npool \
|
||||
linguistic/source/lng \
|
||||
oox/util/oox \
|
||||
package/source/xstor/xstor \
|
||||
package/util/package2 \
|
||||
|
@@ -73,6 +73,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_datapilottableobj,\
|
||||
forms/util/frm \
|
||||
framework/util/fwk \
|
||||
i18npool/util/i18npool \
|
||||
linguistic/source/lng \
|
||||
oox/util/oox \
|
||||
package/source/xstor/xstor \
|
||||
package/util/package2 \
|
||||
|
@@ -73,6 +73,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_namedrangeobj,\
|
||||
forms/util/frm \
|
||||
framework/util/fwk \
|
||||
i18npool/util/i18npool \
|
||||
linguistic/source/lng \
|
||||
oox/util/oox \
|
||||
package/source/xstor/xstor \
|
||||
package/util/package2 \
|
||||
|
@@ -73,6 +73,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_namedrangesobj,\
|
||||
forms/util/frm \
|
||||
framework/util/fwk \
|
||||
i18npool/util/i18npool \
|
||||
linguistic/source/lng \
|
||||
oox/util/oox \
|
||||
package/source/xstor/xstor \
|
||||
package/util/package2 \
|
||||
|
@@ -74,6 +74,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_tablesheetobj,\
|
||||
framework/util/fwk \
|
||||
i18npool/source/search/i18nsearch \
|
||||
i18npool/util/i18npool \
|
||||
linguistic/source/lng \
|
||||
oox/util/oox \
|
||||
package/source/xstor/xstor \
|
||||
package/util/package2 \
|
||||
|
@@ -31,6 +31,7 @@
|
||||
#include <unotools/syslocaleoptions.hxx>
|
||||
#include <osl/file.hxx>
|
||||
#include <unotools/tempfile.hxx>
|
||||
#include <vcl/scheduler.hxx>
|
||||
|
||||
#include <isheadless.hxx>
|
||||
|
||||
@@ -104,6 +105,10 @@ void test::BootstrapFixture::setUp()
|
||||
test::BootstrapFixtureBase::setUp();
|
||||
|
||||
test_init_impl(m_bAssertOnDialog, m_bNeedUCB, m_xSFactory.get());
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
Scheduler::ProcessEventsToIdle();
|
||||
#endif
|
||||
}
|
||||
|
||||
test::BootstrapFixture::~BootstrapFixture()
|
||||
|
@@ -105,7 +105,8 @@ void Scheduler::ImplDeInitScheduler()
|
||||
++nTasks;
|
||||
pSchedulerData = pSchedulerData->mpNext;
|
||||
}
|
||||
SAL_INFO( "vcl.schedule.deinit", "DeInit the scheduler - tasks: " << nTasks );
|
||||
SAL_INFO( "vcl.schedule.deinit",
|
||||
"DeInit the scheduler - pending tasks: " << nTasks );
|
||||
}
|
||||
|
||||
// clean up all the sfx::SfxItemDisruptor_Impl Idles
|
||||
|
Reference in New Issue
Block a user