diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-04-20 09:53:46 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-04-21 08:54:31 (GMT) |
commit | 3e4f9cf4d0d5f6cd66aa6612d0541213278ec060 (patch) | |
tree | 66c8ac7a15c43c9e761de224f7ea2f7075ba8866 /tests/auto | |
parent | 590fa9360f2c473fc175caa88d2fa4bfaf23ea0d (diff) | |
download | Qt-3e4f9cf4d0d5f6cd66aa6612d0541213278ec060.zip Qt-3e4f9cf4d0d5f6cd66aa6612d0541213278ec060.tar.gz Qt-3e4f9cf4d0d5f6cd66aa6612d0541213278ec060.tar.bz2 |
tst_qsharedmemory: create multiple instances of lackey.exe on WinCE
We can't start multiple instances of an executable on Windows CE.
To work around, this test now creates several copies of lackey.exe
Reviewed-by: mauricek
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp b/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp index ebae328..dac631b 100644 --- a/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp +++ b/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp @@ -42,6 +42,7 @@ #include <QtTest/QtTest> #include <qsharedmemory.h> +#include <QtCore/QFile> //TESTED_CLASS= //TESTED_FILES= @@ -746,7 +747,18 @@ void tst_QSharedMemory::simpleProcessProducerConsumer() QStringList arguments = QStringList() << LACKEYDIR "/scripts/consumer.js"; QProcess *p = new QProcess; p->setProcessChannelMode(QProcess::ForwardedChannels); +#ifdef Q_OS_WINCE + // We can't start the same executable twice on Windows CE. + // Create a copy instead. + QString lackeyCopy = QLatin1String(LACKEYDIR "/lackey"); + lackeyCopy.append(QString::number(i)); + lackeyCopy.append(QLatin1String(".exe")); + if (!QFile::exists(lackeyCopy)) + QVERIFY(QFile::copy(LACKEYDIR "/lackey.exe", lackeyCopy)); + p->start(lackeyCopy, arguments); +#else p->start(LACKEYDIR "/lackey", arguments); +#endif if (p->waitForStarted(2000)) consumers.append(p); |