From 6d3558b4492027f54e6dab702c115a251eb9e9d0 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 1 Jan 2015 18:21:35 -0200 Subject: Autotest: Be nicer when asking the sub-processes to exit Instead of killing them outright (and note that terminate() doesn't work on Windows), ask them nicely to exit on their own. This way, if we run them in valgrind, valgrind gets a chance to print the leak check output and summary. Change-Id: Ib6cc8d4560ff0bf255f94980eb220e97592c00f0 Reviewed-by: Frederik Gladhorn --- tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp') diff --git a/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp b/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp index 4d12522a68..0ab03e7dd8 100644 --- a/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp +++ b/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp @@ -143,9 +143,10 @@ void tst_QDBusMarshall::initTestCase() void tst_QDBusMarshall::cleanupTestCase() { - proc.close(); - proc.terminate(); + QDBusMessage msg = QDBusMessage::createMethodCall(serviceName, objectPath, interfaceName, "quit"); + QDBusConnection::sessionBus().call(msg); proc.waitForFinished(200); + proc.close(); } int tst_QDBusMarshall::fileDescriptorForTest() -- cgit v1.2.3