summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@digia.com>2013-09-02 21:00:14 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-03 08:42:24 +0200
commitcd582f841076010dac334427830763838c0996b8 (patch)
tree42cf3aa63d8f9c4ce15c960788e4b973cb436048 /tests/auto/testlib
parent5bd6a4b71a5eeb88ccc2f0fd1515deeeb92e1b53 (diff)
Add QT_NO_PROCESS guards in tests where they are missing
A handful of tests lack QT_NO_PROCESS guards, making them non-compilable on Qt builds with no QProcess support. This commit does not change QProcess-specific tests, which should be left out of the build using the .pro file mechanism. Change-Id: Iac8562428abc1f59ccbb23bf5c3a919785e41f12 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests/auto/testlib')
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index 441254c126..b737f823c8 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -489,6 +489,8 @@ void tst_Selftests::runSubTest_data()
}
}
+#ifndef QT_NO_PROCESS
+
static void insertEnvironmentVariable(QString const& name, QProcessEnvironment &result)
{
const QProcessEnvironment systemEnvironment = QProcessEnvironment::systemEnvironment();
@@ -688,13 +690,19 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
}
}
+#endif // !QT_NO_PROCESS
+
void tst_Selftests::runSubTest()
{
+#ifdef QT_NO_PROCESS
+ QSKIP("This test requires QProcess support");
+#else
QFETCH(QString, subdir);
QFETCH(QStringList, loggers);
QFETCH(QStringList, arguments);
doRunSubTest(subdir, loggers, arguments);
+#endif // !QT_NO_PROCESS
}
// attribute must contain ="