summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-03-03 11:03:21 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-09 10:16:10 +0100
commitb99e0ddfe1cb6657d9eb796452b1ddb9f5772866 (patch)
tree7dd4b636c3903381e685edf403ef08a494f2465f /desktop
parentb41b9681bfcab82dd55459563b59903f96454079 (diff)
desktop: avoid restart when running in a LOK unit test
Cppunit tests just don't run the desktop logic to determine whether to restart normally, but for LOK, that happens. Without this, if versionrc changes, a LOK-using unit test would fail. Simple reproducer: sed -i "s|\(buildid=\).*|\1$(echo $RANDOM|sha1sum -|sed 's/ .*//')|" instdir/program/versionrc make -sr CppunitTest_libreofficekit_tiledrendering Should be an acceptable alternative approach to commit 5acadbfb0c79fe51f8025b065b46b0ccd25c804d (Implement lokconf_init., 2014-07-21). Change-Id: I4354e646d3bcc0c1199db5a175708206b4a30294
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/check_ext_deps.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index ad2d72b07183..2ddbf043a526 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -422,8 +422,10 @@ void Desktop::SynchronizeExtensionRepositories()
deployment::ExtensionManager::get(context)->reinstallDeployedExtensions(
true, "user", Reference<task::XAbortChannel>(), silent);
#if !HAVE_FEATURE_MACOSX_SANDBOX
- task::OfficeRestartManager::get(context)->requestRestart(
- silent->getInteractionHandler());
+ // getenv is a hack to detect if we're running in a LOK unit test
+ if (!getenv("LOK_TEST"))
+ task::OfficeRestartManager::get(context)->requestRestart(
+ silent->getInteractionHandler());
#endif
} else {
// reinstallDeployedExtensions above already calls syncRepositories