Make sure tst_QThreadStorage finds its subprocess
authorBradley T. Hughes <bradley.hughes@nokia.com>
Mon, 2 Jan 2012 11:38:45 +0000 (12:38 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 3 Jan 2012 11:58:24 +0000 (12:58 +0100)
On Mac, the application's dir is in the bundle, so we need to "escape"
the bundle when looking for the an executable relative to the
application's dir path.

Change-Id: I5c01f7d816ec8cc30f5277202f4eefb0c49a2bc3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp

index 11f2ef5..f5f92d1 100644 (file)
@@ -290,7 +290,11 @@ void tst_QThreadStorage::crashOnExit()
     QProcess process;
     // crashOnExit is always expected to be in the same directory
     // as this test binary
+#ifdef Q_OS_MAC
+    process.start(QCoreApplication::applicationDirPath() + "/../../../crashOnExit");
+#else
     process.start(QCoreApplication::applicationDirPath() + "/crashOnExit");
+#endif
     QVERIFY(process.waitForFinished());
     QVERIFY(process.exitStatus() != QProcess::CrashExit);
 }