diff options
Diffstat (limited to 'tests/auto/qsystemsemaphore')
-rw-r--r-- | tests/auto/qsystemsemaphore/test/test.pro | 11 | ||||
-rw-r--r-- | tests/auto/qsystemsemaphore/tst_qsystemsemaphore.cpp | 14 |
2 files changed, 22 insertions, 3 deletions
diff --git a/tests/auto/qsystemsemaphore/test/test.pro b/tests/auto/qsystemsemaphore/test/test.pro index 62ea054..b8d3a4a 100644 --- a/tests/auto/qsystemsemaphore/test/test.pro +++ b/tests/auto/qsystemsemaphore/test/test.pro @@ -18,7 +18,7 @@ win32 { RESOURCES += ../files.qrc wince*: { -# this test calls lackkey, which then again depends on QtScript. +# 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 = ../../qsharedmemory/lackey/lackey.exe @@ -27,3 +27,12 @@ lackey.path = ../qsharedmemory/lackey DEPLOYMENT += lackey } +symbian: { +# 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 = ../../qsharedmemory/lackey/lackey.exe +lackey.path = /sys/bin +DEPLOYMENT += lackey +} diff --git a/tests/auto/qsystemsemaphore/tst_qsystemsemaphore.cpp b/tests/auto/qsystemsemaphore/tst_qsystemsemaphore.cpp index 5bc56a0..b82810b 100644 --- a/tests/auto/qsystemsemaphore/tst_qsystemsemaphore.cpp +++ b/tests/auto/qsystemsemaphore/tst_qsystemsemaphore.cpp @@ -185,6 +185,9 @@ void tst_QSystemSemaphore::complexacquire() void tst_QSystemSemaphore::basicProcesses() { +#if defined (Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86) + QSKIP("Cannot launch multiple Qt processes in Symbian emulator", SkipAll); +#endif QSystemSemaphore sem("store", 0, QSystemSemaphore::Create); QStringList acquireArguments = QStringList() << acquire_js(); @@ -201,6 +204,7 @@ void tst_QSystemSemaphore::basicProcesses() acquire.kill(); release.start(LACKYLOC "/lackey", releaseArguments); acquire.waitForFinished(5000); + release.waitForFinished(5000); QVERIFY(acquire.state() == QProcess::NotRunning); } @@ -216,6 +220,9 @@ void tst_QSystemSemaphore::processes_data() void tst_QSystemSemaphore::processes() { +#if defined (Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86) + QSKIP("Cannot launch multiple Qt processes in Symbian emulator", SkipAll); +#endif QSystemSemaphore sem("store", 1, QSystemSemaphore::Create); QFETCH(int, processes); @@ -242,7 +249,7 @@ void tst_QSystemSemaphore::processes() void tst_QSystemSemaphore::undo() { -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) QSKIP("This test only checks a unix behavior", SkipSingle); #endif @@ -264,9 +271,11 @@ void tst_QSystemSemaphore::undo() void tst_QSystemSemaphore::initialValue() { +#if defined (Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86) + QSKIP("Cannot launch multiple Qt processes in Symbian emulator", SkipAll); +#endif QSystemSemaphore sem("store", 1, QSystemSemaphore::Create); - QStringList acquireArguments = QStringList() << acquire_js(); QStringList releaseArguments = QStringList() << release_js(); QProcess acquire; @@ -286,6 +295,7 @@ void tst_QSystemSemaphore::initialValue() release.start(LACKYLOC "/lackey", releaseArguments); acquire.waitForFinished(10000); + release.waitForFinished(10000); QVERIFY(acquire.state()== QProcess::NotRunning); } QTEST_MAIN(tst_QSystemSemaphore) |