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
This commit is contained in:
parent
54eb3bf137
commit
9f6b0f98b5
1 changed files with 10 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue