From f994399839ce7ef4f22b2c88154dd93d3dcf3673 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 20 Apr 2010 13:06:53 +0200 Subject: tst_qsystemsemaphore: fix deployment of lackey.exe for WinCE Bonus: typo fixed. Reviewed-by: mauricek --- .../qtipc/qsystemsemaphore/qsystemsemaphore.pro | 5 ++--- .../qsystemsemaphore/tst_qsystemsemaphore.cpp | 24 +++++++++++++--------- 2 files changed, 16 insertions(+), 13 deletions(-) (limited to 'tests/auto/qtipc/qsystemsemaphore') diff --git a/tests/auto/qtipc/qsystemsemaphore/qsystemsemaphore.pro b/tests/auto/qtipc/qsystemsemaphore/qsystemsemaphore.pro index 1f9205eab6..8a5f8b2fa7 100644 --- a/tests/auto/qtipc/qsystemsemaphore/qsystemsemaphore.pro +++ b/tests/auto/qtipc/qsystemsemaphore/qsystemsemaphore.pro @@ -17,9 +17,8 @@ requires(contains(QT_CONFIG,script)) # this test calls lackey, which then again depends on QtScript. # let's add it here so that it gets deployed easily QT += script -lackey.sources = ../lackey/lackey.exe -lackey.path = ../lackey - +lackey.sources = $$OUT_PWD/../lackey/lackey.exe ../lackey/scripts +lackey.path = . DEPLOYMENT += lackey } diff --git a/tests/auto/qtipc/qsystemsemaphore/tst_qsystemsemaphore.cpp b/tests/auto/qtipc/qsystemsemaphore/tst_qsystemsemaphore.cpp index eb82fd41b3..d8f318ffc3 100644 --- a/tests/auto/qtipc/qsystemsemaphore/tst_qsystemsemaphore.cpp +++ b/tests/auto/qtipc/qsystemsemaphore/tst_qsystemsemaphore.cpp @@ -46,7 +46,11 @@ //TESTED_FILES= #define EXISTING_SHARE "existing" -#define LACKYLOC "../lackey" +#ifdef Q_OS_WINCE +#define LACKEYLOC "." +#else +#define LACKEYLOC "../lackey" +#endif #define LACKYWAITTIME 10000 class tst_QSystemSemaphore : public QObject @@ -109,7 +113,7 @@ private: tst_QSystemSemaphore::tst_QSystemSemaphore() { - if (!QFile::exists(LACKYLOC "/lackey")) + if (!QFile::exists(LACKEYLOC "/lackey")) qWarning() << "lackey executable doesn't exists!"; } @@ -197,11 +201,11 @@ void tst_QSystemSemaphore::basicProcesses() QProcess release; release.setProcessChannelMode(QProcess::ForwardedChannels); - acquire.start(LACKYLOC "/lackey", acquireArguments); + acquire.start(LACKEYLOC "/lackey", acquireArguments); acquire.waitForFinished(LACKYWAITTIME); QVERIFY(acquire.state() == QProcess::Running); acquire.kill(); - release.start(LACKYLOC "/lackey", releaseArguments); + release.start(LACKEYLOC "/lackey", releaseArguments); acquire.waitForFinished(LACKYWAITTIME); release.waitForFinished(LACKYWAITTIME); QVERIFY(acquire.state() == QProcess::NotRunning); @@ -235,7 +239,7 @@ void tst_QSystemSemaphore::processes() QProcess *p = new QProcess; p->setProcessChannelMode(QProcess::ForwardedChannels); consumers.append(p); - p->start(LACKYLOC "/lackey", arguments); + p->start(LACKEYLOC "/lackey", arguments); } while (!consumers.isEmpty()) { @@ -257,13 +261,13 @@ void tst_QSystemSemaphore::undo() QStringList acquireArguments = QStringList() << acquire_js(); QProcess acquire; acquire.setProcessChannelMode(QProcess::ForwardedChannels); - acquire.start(LACKYLOC "/lackey", acquireArguments); + acquire.start(LACKEYLOC "/lackey", acquireArguments); acquire.waitForFinished(LACKYWAITTIME); QVERIFY(acquire.state()== QProcess::NotRunning); // At process exit the kernel should auto undo - acquire.start(LACKYLOC "/lackey", acquireArguments); + acquire.start(LACKEYLOC "/lackey", acquireArguments); acquire.waitForFinished(LACKYWAITTIME); QVERIFY(acquire.state()== QProcess::NotRunning); } @@ -283,16 +287,16 @@ void tst_QSystemSemaphore::initialValue() QProcess release; release.setProcessChannelMode(QProcess::ForwardedChannels); - acquire.start(LACKYLOC "/lackey", acquireArguments); + acquire.start(LACKEYLOC "/lackey", acquireArguments); acquire.waitForFinished(LACKYWAITTIME); QVERIFY(acquire.state()== QProcess::NotRunning); - acquire.start(LACKYLOC "/lackey", acquireArguments << "2"); + acquire.start(LACKEYLOC "/lackey", acquireArguments << "2"); acquire.waitForFinished(LACKYWAITTIME); QVERIFY(acquire.state()== QProcess::Running); acquire.kill(); - release.start(LACKYLOC "/lackey", releaseArguments); + release.start(LACKEYLOC "/lackey", releaseArguments); acquire.waitForFinished(LACKYWAITTIME); release.waitForFinished(LACKYWAITTIME); QVERIFY(acquire.state()== QProcess::NotRunning); -- cgit v1.2.1