From 36314ae75f2f13b6c93252dc2c93592bc0624296 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 11 Dec 2014 17:42:49 -0800 Subject: Fix handling of subprocesses for QtDBus unit tests on Windows The executables are not in the same dir as on Unix, so we need to use QFINDTESTDATA to find them. The DESTDIR setting prevents qmake from placing the executables in a "debug/" subdir. Change-Id: I1d6d10e6f6f109f55fd9809dcf83da0386f38772 Reviewed-by: Simon Hausmann --- tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 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 972205566a..0d9fba3e1f 100644 --- a/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp +++ b/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp @@ -130,13 +130,15 @@ void tst_QDBusMarshall::initTestCase() commonInit(); QDBusConnection con = QDBusConnection::sessionBus(); fileDescriptorPassing = con.connectionCapabilities() & QDBusConnection::UnixFileDescriptorPassing; + #ifdef Q_OS_WIN - proc.start("qpong"); +# define EXE ".exe" #else - proc.start("./qpong/qpong"); +# define EXE "" #endif + proc.start(QFINDTESTDATA("qpong/qpong" EXE)); if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(serviceName)) { - QVERIFY(proc.waitForStarted()); + QVERIFY2(proc.waitForStarted(), qPrintable(proc.errorString())); QVERIFY(con.isConnected()); con.connect("org.freedesktop.DBus", QString(), "org.freedesktop.DBus", "NameOwnerChanged", -- cgit v1.2.3