summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io
diff options
context:
space:
mode:
authorPasi Petäjäjärvi <pasi.petajajarvi@digia.com>2013-01-16 14:34:35 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-23 10:38:59 +0100
commit416e73a0fcaf31f7c32ba7dcd214b62e6060123c (patch)
tree1be730c488c0f979a5ab1ffb40631489a5a9c94b /tests/auto/corelib/io
parent2d2da44f6381fdeaa195319c0dc66e3909c2ca7b (diff)
Check existence of QProcess feature before using it on Qt autotests.
VxWorks does not have QProcess support. Change-Id: I20ed479125097d468a1aa50afb18c3749f0fbb98 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'tests/auto/corelib/io')
-rw-r--r--tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp5
-rw-r--r--tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp8
2 files changed, 7 insertions, 6 deletions
diff --git a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
index 3826bfc4e2..b00cdc64b8 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 bcbd257de3..43ce7f7a45 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()
{