Commit 9f6b0f98 authored by Martin Flöser's avatar Martin Flöser

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
parent 54eb3bf1
......@@ -31,6 +31,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "xcbutils.h"
#include <kwineffects.h>
#include <QDBusConnection>
#include <QDBusMessage>
#include <QDBusPendingCall>
#include <netwm.h>
#include <xcb/xcb_icccm.h>
......@@ -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()
......
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