summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp5
-rw-r--r--tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp8
-rw-r--r--tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp8
-rw-r--r--tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp4
-rw-r--r--tests/auto/corelib/plugin/quuid/tst_quuid.cpp4
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp4
6 files changed, 25 insertions, 8 deletions
diff --git a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
index 9d3519680c..45f143b9fb 100644
--- a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
+++ b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
@@ -43,6 +43,10 @@
#include <QObject>
#include <QProcessEnvironment>
+#ifdef QT_NO_PROCESS
+QTEST_NOOP_MAIN
+#else
+
class tst_QProcessEnvironment: public QObject
{
Q_OBJECT
@@ -318,3 +322,4 @@ void tst_QProcessEnvironment::putenv()
QTEST_MAIN(tst_QProcessEnvironment)
#include "tst_qprocessenvironment.moc"
+#endif
diff --git a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
index a6e1f73904..56c07f1590 100644
--- a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
+++ b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
@@ -194,7 +194,7 @@ private slots:
void pos();
void pos2();
void pos3LargeFile();
-#ifndef Q_OS_WINCE
+#if !defined(Q_OS_WINCE) && !defined(QT_NO_PROCESS)
void readStdin();
void readAllFromStdin();
void readLineFromStdin();
@@ -1386,8 +1386,8 @@ void tst_QTextStream::pos3LargeFile()
}
// ------------------------------------------------------------------------------
-#ifndef Q_OS_WINCE
// Qt/CE has no stdin/out support for processes
+#if !defined(Q_OS_WINCE) && !defined(QT_NO_PROCESS)
void tst_QTextStream::readStdin()
{
QProcess stdinProcess;
@@ -1409,10 +1409,8 @@ void tst_QTextStream::readStdin()
QCOMPARE(b, 2);
QCOMPARE(c, 3);
}
-#endif
// ------------------------------------------------------------------------------
-#ifndef Q_OS_WINCE
// Qt/CE has no stdin/out support for processes
void tst_QTextStream::readAllFromStdin()
{
@@ -1430,10 +1428,8 @@ void tst_QTextStream::readAllFromStdin()
QChar quoteChar('"');
QCOMPARE(stream.readAll(), QString::fromLatin1("%1hello world%2 \n").arg(quoteChar).arg(quoteChar));
}
-#endif
// ------------------------------------------------------------------------------
-#ifndef Q_OS_WINCE
// Qt/CE has no stdin/out support for processes
void tst_QTextStream::readLineFromStdin()
{
diff --git a/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp b/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp
index daf8c31772..02f99b08d3 100644
--- a/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp
+++ b/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp
@@ -82,7 +82,7 @@ private slots:
void removeWhileAttached();
#endif
void emptyMemory();
-#ifndef Q_OS_WIN
+#if !defined(Q_OS_WIN) && !defined(QT_NO_PROCESS)
void readOnly();
#endif
@@ -98,8 +98,10 @@ private slots:
void simpleThreadedProducerConsumer();
// with processes
+#ifndef QT_NO_PROCESS
void simpleProcessProducerConsumer_data();
void simpleProcessProducerConsumer();
+#endif
// extreme cases
void useTooMuchMemory();
@@ -447,7 +449,7 @@ void tst_QSharedMemory::emptyMemory()
by writing to data and causing a segfault.
*/
// This test opens a crash dialog on Windows.
-#ifndef Q_OS_WIN
+#if !defined(Q_OS_WIN) && !defined(QT_NO_PROCESS)
void tst_QSharedMemory::readOnly()
{
rememberKey("readonly_segfault");
@@ -728,6 +730,7 @@ void tst_QSharedMemory::simpleThreadedProducerConsumer()
}
}
+#ifndef QT_NO_PROCESS
void tst_QSharedMemory::simpleProcessProducerConsumer_data()
{
QTest::addColumn<int>("processes");
@@ -785,6 +788,7 @@ void tst_QSharedMemory::simpleProcessProducerConsumer()
producer.waitForBytesWritten();
QVERIFY(producer.waitForFinished(5000));
}
+#endif
void tst_QSharedMemory::uniqueKey_data()
{
diff --git a/tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp b/tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp
index b10da3ecb7..d2b6848dab 100644
--- a/tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp
+++ b/tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp
@@ -66,6 +66,7 @@ private slots:
void basicacquire();
void complexacquire();
+#ifndef QT_NO_PROCESS
void basicProcesses();
void processes_data();
@@ -75,6 +76,7 @@ private slots:
void undo();
#endif
void initialValue();
+#endif // QT_NO_PROCESS
private:
QString helperBinary();
@@ -154,6 +156,7 @@ void tst_QSystemSemaphore::complexacquire()
QCOMPARE(sem.errorString(), QString());
}
+#ifndef QT_NO_PROCESS
void tst_QSystemSemaphore::basicProcesses()
{
QSystemSemaphore sem("store", 0, QSystemSemaphore::Create);
@@ -261,6 +264,7 @@ void tst_QSystemSemaphore::initialValue()
release.waitForFinished(HELPERWAITTIME);
QVERIFY(acquire.state()== QProcess::NotRunning);
}
+#endif
QString tst_QSystemSemaphore::helperBinary()
{
diff --git a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
index 224c992def..197d56359f 100644
--- a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
+++ b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
@@ -73,7 +73,9 @@ private slots:
void versions();
void threadUniqueness();
+#ifndef QT_NO_PROCESS
void processUniqueness();
+#endif
void hash();
@@ -319,6 +321,7 @@ void tst_QUuid::threadUniqueness()
qDeleteAll(threads);
}
+#ifndef QT_NO_PROCESS
void tst_QUuid::processUniqueness()
{
QProcess process;
@@ -346,6 +349,7 @@ void tst_QUuid::processUniqueness()
// They should be *different*!
QVERIFY(processOneOutput != processTwoOutput);
}
+#endif
void tst_QUuid::hash()
{
diff --git a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
index 29dbf2e31f..2072034f5f 100644
--- a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
+++ b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
@@ -71,7 +71,9 @@ private slots:
void autoDelete();
void adoptedThreads();
void ensureCleanupOrder();
+#ifndef QT_NO_PROCESS
void crashOnExit();
+#endif
void leakInDestructor();
void resetInDestructor();
void valueBased();
@@ -305,6 +307,7 @@ void tst_QThreadStorage::ensureCleanupOrder()
QVERIFY(First::order < Second::order);
}
+#ifndef QT_NO_PROCESS
static inline bool runCrashOnExit(const QString &binary, QString *errorMessage)
{
const int timeout = 60000;
@@ -332,6 +335,7 @@ void tst_QThreadStorage::crashOnExit()
QVERIFY2(runCrashOnExit(m_crashOnExit, &errorMessage),
qPrintable(errorMessage));
}
+#endif
// S stands for thread Safe.
class SPointer