Fix the way how we quit kactivitymanagerd from the unit test
ClosedPublic

Authored by graesslin on Nov 9 2018, 4:27 PM.

Details

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

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.Nov 9 2018, 4:27 PM
Restricted Application added a project: KWin. · View Herald TranscriptNov 9 2018, 4:27 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
graesslin requested review of this revision.Nov 9 2018, 4:27 PM
davidedmundson accepted this revision.Nov 9 2018, 4:28 PM
davidedmundson added a subscriber: davidedmundson.
davidedmundson added inline comments.
autotests/integration/activities_test.cpp
36

unused

This revision is now accepted and ready to land.Nov 9 2018, 4:28 PM
graesslin added inline comments.Nov 9 2018, 4:31 PM
autotests/integration/activities_test.cpp
36

Are you sure?

/home/martin/src/kde/workspace/kwin/autotests/integration/activities_test.cpp: In member function ‘void KWin::ActivitiesTest::cleanupTestCase()’:
/home/martin/src/kde/workspace/kwin/autotests/integration/activities_test.cpp:87:32: error: invalid use of incomplete type ‘class QDBusPendingCall’
         QStringLiteral("quit")));
                                ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtDBus/QDBusConnection:1:0,
                 from /home/martin/src/kde/workspace/kwin/autotests/integration/activities_test.cpp:34:
/usr/include/x86_64-linux-gnu/qt5/QtDBus/qdbusconnection.h:71:7: note: forward declaration of ‘class QDBusPendingCall’
 class QDBusPendingCall;
       ^~~~~~~~~~~~~~~~
autotests/integration/CMakeFiles/testActivities.dir/build.make:62: recipe for target 'autotests/integration/CMakeFiles/testActivities.dir/activities_test.cpp.o' failed
make[2]: *** [autotests/integration/CMakeFiles/testActivities.dir/activities_test.cpp.o] Error 1
CMakeFiles/Makefile2:10944: recipe for target 'autotests/integration/CMakeFiles/testActivities.dir/all' failed
make[1]: *** [autotests/integration/CMakeFiles/testActivities.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
*** Failure: Exit code 2 ***

asyncCall returns a QDBusPendingCall and without the include it doesn't compile.

This revision was automatically updated to reflect the committed changes.