Make sure tst_QThreadStorage finds its subprocess

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>
This commit is contained in:
Bradley T. Hughes 2012-01-02 12:38:45 +01:00 committed by Qt by Nokia
parent 991b91ce57
commit 68202f646a

View 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);
}