summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsharedmemory
diff options
context:
space:
mode:
authorninerider <qt-info@nokia.com>2009-09-24 09:51:06 (GMT)
committerninerider <qt-info@nokia.com>2009-09-25 07:51:14 (GMT)
commit04e751723f8c6a9c510abae5cf66608f422bdc23 (patch)
treecd9e283515f6fea28ade06987d9ab07e73a4f382 /tests/auto/qsharedmemory
parentb3d3f6088147a457274b2173b93d657540dd056f (diff)
downloadQt-04e751723f8c6a9c510abae5cf66608f422bdc23.zip
Qt-04e751723f8c6a9c510abae5cf66608f422bdc23.tar.gz
Qt-04e751723f8c6a9c510abae5cf66608f422bdc23.tar.bz2
Fixed path for lackey.exe for Windows CE
Also added check, whether some processes where actually not started. Reviewed-by: Joerg
Diffstat (limited to 'tests/auto/qsharedmemory')
-rw-r--r--tests/auto/qsharedmemory/tst_qsharedmemory.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/auto/qsharedmemory/tst_qsharedmemory.cpp b/tests/auto/qsharedmemory/tst_qsharedmemory.cpp
index c0a1c2b..c4ff76c 100644
--- a/tests/auto/qsharedmemory/tst_qsharedmemory.cpp
+++ b/tests/auto/qsharedmemory/tst_qsharedmemory.cpp
@@ -737,11 +737,12 @@ void tst_QSharedMemory::simpleProcessProducerConsumer()
#endif
QProcess producer;
producer.setProcessChannelMode(QProcess::ForwardedChannels);
- producer.start("./lackey/lackey", arguments);
+ producer.start( QFileInfo("./lackey/lackey.exe").absoluteFilePath(), arguments);
producer.waitForStarted();
QVERIFY(producer.error() != QProcess::FailedToStart);
QList<QProcess*> consumers;
+ unsigned int failedProcesses = 0;
for (int i = 0; i < processes; ++i) {
#ifndef Q_OS_WINCE
QStringList arguments = QStringList() << SRCDIR "lackey/scripts/consumer.js";
@@ -750,8 +751,12 @@ void tst_QSharedMemory::simpleProcessProducerConsumer()
#endif
QProcess *p = new QProcess;
p->setProcessChannelMode(QProcess::ForwardedChannels);
- consumers.append(p);
p->start("./lackey/lackey", arguments);
+
+ if (p->waitForStarted(2000))
+ consumers.append(p);
+ else
+ ++failedProcesses;
}
producer.waitForFinished(5000);
@@ -768,6 +773,7 @@ void tst_QSharedMemory::simpleProcessProducerConsumer()
delete consumers.takeFirst();
}
QCOMPARE(consumerFailed, false);
+ QCOMPARE(failedProcesses, unsigned int (0));
}
QTEST_MAIN(tst_QSharedMemory)