summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtipc
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2010-04-20 11:06:53 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2010-04-21 08:54:49 (GMT)
commitf994399839ce7ef4f22b2c88154dd93d3dcf3673 (patch)
tree83359daec93dd8af1d740f29093e4e65ea070962 /tests/auto/qtipc
parent3e4f9cf4d0d5f6cd66aa6612d0541213278ec060 (diff)
downloadQt-f994399839ce7ef4f22b2c88154dd93d3dcf3673.zip
Qt-f994399839ce7ef4f22b2c88154dd93d3dcf3673.tar.gz
Qt-f994399839ce7ef4f22b2c88154dd93d3dcf3673.tar.bz2
tst_qsystemsemaphore: fix deployment of lackey.exe for WinCE
Bonus: typo fixed. Reviewed-by: mauricek
Diffstat (limited to 'tests/auto/qtipc')
-rw-r--r--tests/auto/qtipc/qsystemsemaphore/qsystemsemaphore.pro5
-rw-r--r--tests/auto/qtipc/qsystemsemaphore/tst_qsystemsemaphore.cpp24
2 files changed, 16 insertions, 13 deletions
diff --git a/tests/auto/qtipc/qsystemsemaphore/qsystemsemaphore.pro b/tests/auto/qtipc/qsystemsemaphore/qsystemsemaphore.pro
index 1f9205e..8a5f8b2 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 eb82fd4..d8f318f 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);