From 9f6b0f98b5ea70ca3c627af73b943e4fbf273dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Fri, 9 Nov 2018 17:25:02 +0100 Subject: [PATCH] Fix the way how we quit kactivitymanagerd from the unit test Summary: Kactivitymanagerd is a libexec executable now so we cannot just execute it and cannot know it's path. We need to stop it as otherwise ctest does not terminate the testActivities. This change uses dbus to quit the kactivitymanagerd. Test Plan: ctest did not timeout on testActivities Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16780 --- autotests/integration/activities_test.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/autotests/integration/activities_test.cpp b/autotests/integration/activities_test.cpp index 91c2385137..c9747ccf7c 100644 --- a/autotests/integration/activities_test.cpp +++ b/autotests/integration/activities_test.cpp @@ -31,6 +31,10 @@ along with this program. If not, see . #include "xcbutils.h" #include +#include +#include +#include + #include #include @@ -75,7 +79,12 @@ void ActivitiesTest::initTestCase() void ActivitiesTest::cleanupTestCase() { - QProcess::execute(QStringLiteral("kactivitymanagerd"), QStringList{QStringLiteral("stop")}); + // terminate any still running kactivitymanagerd + QDBusConnection::sessionBus().asyncCall(QDBusMessage::createMethodCall( + QStringLiteral("org.kde.ActivityManager"), + QStringLiteral("/ActivityManager"), + QStringLiteral("org.qtproject.Qt.QCoreApplication"), + QStringLiteral("quit"))); } void ActivitiesTest::init()