summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);