summaryrefslogtreecommitdiffstats
path: root/tests/auto/windeployqt
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-03-02 13:25:04 +0100
committerUlf Hermann <ulf.hermann@qt.io>2017-09-12 14:23:15 +0000
commit4cb8667d20ff9f4af1451c54560ea864630f49b9 (patch)
tree800c187243f86e5e655c261ff895f519ffe43bb2 /tests/auto/windeployqt
parent1ace238ce0347857a5ba55d6fa30ba81fed204b9 (diff)
Fix problems when building with -no-feature-process
Guard the QProcess includes, modernize some ifdefs, exclude tests and examples that don't work without processes, and use QT_CONFIG(process) rather than QT_BOOTSTRAPPED as discriminator where we are actually checking for QProcess support. Also, don't try to build linguist and designer without QProcess. Change-Id: I4e1c7485a96ff02f2f6241113add35e44dc54b1d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'tests/auto/windeployqt')
-rw-r--r--tests/auto/windeployqt/tst_windeployqt.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/auto/windeployqt/tst_windeployqt.cpp b/tests/auto/windeployqt/tst_windeployqt.cpp
index 30da829e7..f20e59180 100644
--- a/tests/auto/windeployqt/tst_windeployqt.cpp
+++ b/tests/auto/windeployqt/tst_windeployqt.cpp
@@ -37,7 +37,6 @@
#include <QtCore/QTextStream>
#include <QtTest/QtTest>
-#ifndef QT_NO_PROCESS
static const QString msgProcessError(const QProcess &process, const QString &what,
const QByteArray &stdOut = QByteArray(),
const QByteArray &stdErr = QByteArray())
@@ -98,8 +97,6 @@ static bool runProcess(const QString &binary,
return true;
}
-#endif // !QT_NO_PROCESS
-
class tst_windeployqt : public QObject
{
Q_OBJECT
@@ -116,9 +113,6 @@ private:
void tst_windeployqt::initTestCase()
{
-#ifdef QT_NO_PROCESS
- QSKIP("This test requires QProcess support");
-#else
m_windeployqtBinary = QStandardPaths::findExecutable("windeployqt");
QVERIFY(!m_windeployqtBinary.isEmpty());
m_testApp = QFINDTESTDATA("testapp");
@@ -126,14 +120,10 @@ void tst_windeployqt::initTestCase()
const QFileInfo testAppBinary(m_testApp + QLatin1String("/testapp.exe"));
QVERIFY2(testAppBinary.isFile(), qPrintable(testAppBinary.absoluteFilePath()));
m_testAppBinary = testAppBinary.absoluteFilePath();
-#endif // QT_NO_PROCESS
}
void tst_windeployqt::help()
{
-#ifdef QT_NO_PROCESS
- QSKIP("This test requires QProcess support");
-#else
QString errorMessage;
QByteArray stdOut;
QByteArray stdErr;
@@ -141,7 +131,6 @@ void tst_windeployqt::help()
QString(), QProcessEnvironment(), 5000, &stdOut, &stdErr),
qPrintable(errorMessage));
QVERIFY2(!stdOut.isEmpty(), stdErr);
-#endif // QT_NO_PROCESS
}
// deploy(): Deploys the test application and launches it with Qt removed from the environment
@@ -149,9 +138,6 @@ void tst_windeployqt::help()
void tst_windeployqt::deploy()
{
-#ifdef QT_NO_PROCESS
- QSKIP("This test requires QProcess support");
-#else
QString errorMessage;
// Deploy application
QStringList deployArguments;
@@ -189,7 +175,6 @@ void tst_windeployqt::deploy()
// Verify that application still runs
QVERIFY2(runProcess(m_testAppBinary, QStringList(), &errorMessage, QString(), env, 10000),
qPrintable(errorMessage));
-#endif // QT_NO_PROCESS
}
QTEST_MAIN(tst_windeployqt)