diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-04-20 11:22:42 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-04-21 08:55:08 (GMT) |
commit | 27a2684da0a76b98356f845c55b654e0b074419d (patch) | |
tree | 9a02c24eb5e8f84278a580af352875664c039c63 | |
parent | f994399839ce7ef4f22b2c88154dd93d3dcf3673 (diff) | |
download | Qt-27a2684da0a76b98356f845c55b654e0b074419d.zip Qt-27a2684da0a76b98356f845c55b654e0b074419d.tar.gz Qt-27a2684da0a76b98356f845c55b654e0b074419d.tar.bz2 |
tst_QSystemSemaphore::processes fixed for WinCE
We can't start the same executable twice on Windows CE.
This tests creates copies of lackey.exe now.
Reviewed-by: mauricek
-rw-r--r-- | tests/auto/qtipc/qsystemsemaphore/tst_qsystemsemaphore.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qtipc/qsystemsemaphore/tst_qsystemsemaphore.cpp b/tests/auto/qtipc/qsystemsemaphore/tst_qsystemsemaphore.cpp index d8f318f..cb3bb6b 100644 --- a/tests/auto/qtipc/qsystemsemaphore/tst_qsystemsemaphore.cpp +++ b/tests/auto/qtipc/qsystemsemaphore/tst_qsystemsemaphore.cpp @@ -239,7 +239,20 @@ void tst_QSystemSemaphore::processes() QProcess *p = new QProcess; p->setProcessChannelMode(QProcess::ForwardedChannels); consumers.append(p); +#ifdef Q_OS_WINCE + // We can't start the same executable twice on Windows CE. + // Create a copy instead. + QString lackeyCopy = QLatin1String(LACKEYLOC "/lackey"); + if (i > 0) { + lackeyCopy.append(QString::number(i)); + lackeyCopy.append(QLatin1String(".exe")); + if (!QFile::exists(lackeyCopy)) + QVERIFY(QFile::copy(LACKEYLOC "/lackey.exe", lackeyCopy)); + } + p->start(lackeyCopy, arguments); +#else p->start(LACKEYLOC "/lackey", arguments); +#endif } while (!consumers.isEmpty()) { |