From f4c0bd7d65b814cae7e1ba35f0f7fc1a521860a5 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Mon, 7 Jul 2014 11:03:30 +0200 Subject: Compile fix for platforms without process support Change-Id: Ie150bec62827b592d4b3f2df98a51862d3cc76ae Reviewed-by: Oliver Wolff --- tests/auto/xmlpatterns/tst_xmlpatterns.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'tests/auto/xmlpatterns/tst_xmlpatterns.cpp') diff --git a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp index a5c6c84..06c1218 100644 --- a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp +++ b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp @@ -74,7 +74,9 @@ private Q_SLOTS: void xquerySupport_data() const; void xsltSupport(); void xsltSupport_data() const; +#ifndef QT_NO_PROCESS void stdoutFailure() const; +#endif void cleanupTestCase() const; private: @@ -106,6 +108,7 @@ void tst_XmlPatterns::initTestCase() { QVERIFY(m_normalizeTestName.isValid()); +#ifndef QT_NO_PROCESS QProcess process; process.start(m_command); @@ -119,7 +122,9 @@ void tst_XmlPatterns::initTestCase() ).arg(m_command)) ); } - +#else + QSKIP("Skipping test due to not having process support"); +#endif // QT_NO_PROCESS } void tst_XmlPatterns::xquerySupport() @@ -135,6 +140,7 @@ void tst_XmlPatterns::xquerySupport() QSKIP("WinCE: This test uses unsupported WinCE functionality"); #endif +#ifndef QT_NO_PROCESS QFETCH(int, expectedExitCode); QFETCH(QByteArray, expectedQueryOutput); QFETCH(QStringList, arguments); @@ -219,6 +225,10 @@ void tst_XmlPatterns::xquerySupport() removeNonWritable(outFile); } + +#else + QSKIP("Skipping test due to not having process support"); +#endif // QT_NO_PROCESS } void tst_XmlPatterns::xquerySupport_data() const @@ -801,6 +811,7 @@ void tst_XmlPatterns::removeNonWritable(QFile &outFile) Check that we gracefully handle writing out to stdout when the latter is not writable. */ +#ifndef QT_NO_PROCESS void tst_XmlPatterns::stdoutFailure() const { return; // TODO It's really hard to write testing code for this. @@ -826,6 +837,7 @@ void tst_XmlPatterns::stdoutFailure() const removeNonWritable(outFile); } +#endif void tst_XmlPatterns::cleanupTestCase() const { -- cgit v1.2.1