summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qprocess
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-11-23 12:25:17 +0100
committerUlf Hermann <ulf.hermann@qt.io>2017-02-27 15:44:46 +0000
commit44af54419eaceb27bb729717d6363917fd6bb819 (patch)
treeb111875dd8cb8ff653cb0e27cfa766933ca6d589 /tests/auto/corelib/io/qprocess
parent85b30fda7ceccecfd3938703979b3431bdedc9a2 (diff)
Properly use the "process" feature
Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess headers, exclude the sources from compilation when switched off, guard header inclusions in places where compilation without QProcess seems supported, drop some unused includes, and fix some tests that were apparently designed to work with QT_NO_PROCESS but failed to. Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'tests/auto/corelib/io/qprocess')
-rw-r--r--tests/auto/corelib/io/qprocess/testForwarding/main.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp13
2 files changed, 0 insertions, 15 deletions
diff --git a/tests/auto/corelib/io/qprocess/testForwarding/main.cpp b/tests/auto/corelib/io/qprocess/testForwarding/main.cpp
index d76156219e..b7367ff8c6 100644
--- a/tests/auto/corelib/io/qprocess/testForwarding/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testForwarding/main.cpp
@@ -38,7 +38,6 @@ int main(int argc, char **argv)
if (argc < 3)
return 13;
-#ifndef QT_NO_PROCESS
QProcess process;
QProcess::ProcessChannelMode mode = (QProcess::ProcessChannelMode)atoi(argv[1]);
@@ -69,6 +68,5 @@ int main(int argc, char **argv)
if ((mode == QProcess::ForwardedErrorChannel || mode == QProcess::ForwardedChannels)
&& !process.readAllStandardError().isEmpty())
return 6;
-#endif
return 0;
}
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index 3f3533c9a1..82efbdcb2c 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -53,7 +53,6 @@ public slots:
void cleanupTestCase();
void init();
-#ifndef QT_NO_PROCESS
private slots:
void getSetCheck();
void constructing();
@@ -159,26 +158,18 @@ protected slots:
private:
qint64 bytesAvailable;
QTemporaryDir m_temporaryDir;
-#endif //QT_NO_PROCESS
};
void tst_QProcess::initTestCase()
{
-#ifdef QT_NO_PROCESS
- QSKIP("This test requires QProcess support");
-#else
QVERIFY2(m_temporaryDir.isValid(), qPrintable(m_temporaryDir.errorString()));
// chdir to our testdata path and execute helper apps relative to that.
QString testdata_dir = QFileInfo(QFINDTESTDATA("testProcessNormal")).absolutePath();
QVERIFY2(QDir::setCurrent(testdata_dir), qPrintable("Could not chdir to " + testdata_dir));
-#endif
}
void tst_QProcess::cleanupTestCase()
{
-#ifdef QT_NO_PROCESS
- QSKIP("This test requires QProcess support");
-#endif
}
void tst_QProcess::init()
@@ -186,8 +177,6 @@ void tst_QProcess::init()
bytesAvailable = 0;
}
-#ifndef QT_NO_PROCESS
-
// Testing get/set functions
void tst_QProcess::getSetCheck()
{
@@ -2406,7 +2395,5 @@ void tst_QProcess::processEventsInAReadyReadSlot()
QVERIFY(process.waitForFinished());
}
-#endif //QT_NO_PROCESS
-
QTEST_MAIN(tst_QProcess)
#include "tst_qprocess.moc"