Commit f4c0bd7d authored by Maurice Kalinowski's avatar Maurice Kalinowski
Browse files

Compile fix for platforms without process support


Change-Id: Ie150bec62827b592d4b3f2df98a51862d3cc76ae
Reviewed-by: default avatarOliver Wolff <oliver.wolff@digia.com>
Showing with 21 additions and 1 deletion
...@@ -74,7 +74,9 @@ private Q_SLOTS: ...@@ -74,7 +74,9 @@ private Q_SLOTS:
void xquerySupport_data() const; void xquerySupport_data() const;
void xsltSupport(); void xsltSupport();
void xsltSupport_data() const; void xsltSupport_data() const;
#ifndef QT_NO_PROCESS
void stdoutFailure() const; void stdoutFailure() const;
#endif
void cleanupTestCase() const; void cleanupTestCase() const;
private: private:
...@@ -106,6 +108,7 @@ void tst_XmlPatterns::initTestCase() ...@@ -106,6 +108,7 @@ void tst_XmlPatterns::initTestCase()
{ {
QVERIFY(m_normalizeTestName.isValid()); QVERIFY(m_normalizeTestName.isValid());
#ifndef QT_NO_PROCESS
QProcess process; QProcess process;
process.start(m_command); process.start(m_command);
...@@ -119,7 +122,9 @@ void tst_XmlPatterns::initTestCase() ...@@ -119,7 +122,9 @@ void tst_XmlPatterns::initTestCase()
).arg(m_command)) ).arg(m_command))
); );
} }
#else
QSKIP("Skipping test due to not having process support");
#endif // QT_NO_PROCESS
} }
void tst_XmlPatterns::xquerySupport() void tst_XmlPatterns::xquerySupport()
...@@ -135,6 +140,7 @@ void tst_XmlPatterns::xquerySupport() ...@@ -135,6 +140,7 @@ void tst_XmlPatterns::xquerySupport()
QSKIP("WinCE: This test uses unsupported WinCE functionality"); QSKIP("WinCE: This test uses unsupported WinCE functionality");
#endif #endif
#ifndef QT_NO_PROCESS
QFETCH(int, expectedExitCode); QFETCH(int, expectedExitCode);
QFETCH(QByteArray, expectedQueryOutput); QFETCH(QByteArray, expectedQueryOutput);
QFETCH(QStringList, arguments); QFETCH(QStringList, arguments);
...@@ -219,6 +225,10 @@ void tst_XmlPatterns::xquerySupport() ...@@ -219,6 +225,10 @@ void tst_XmlPatterns::xquerySupport()
removeNonWritable(outFile); removeNonWritable(outFile);
} }
#else
QSKIP("Skipping test due to not having process support");
#endif // QT_NO_PROCESS
} }
void tst_XmlPatterns::xquerySupport_data() const void tst_XmlPatterns::xquerySupport_data() const
...@@ -801,6 +811,7 @@ void tst_XmlPatterns::removeNonWritable(QFile &outFile) ...@@ -801,6 +811,7 @@ void tst_XmlPatterns::removeNonWritable(QFile &outFile)
Check that we gracefully handle writing out to stdout Check that we gracefully handle writing out to stdout
when the latter is not writable. when the latter is not writable.
*/ */
#ifndef QT_NO_PROCESS
void tst_XmlPatterns::stdoutFailure() const void tst_XmlPatterns::stdoutFailure() const
{ {
return; // TODO It's really hard to write testing code for this. return; // TODO It's really hard to write testing code for this.
...@@ -826,6 +837,7 @@ void tst_XmlPatterns::stdoutFailure() const ...@@ -826,6 +837,7 @@ void tst_XmlPatterns::stdoutFailure() const
removeNonWritable(outFile); removeNonWritable(outFile);
} }
#endif
void tst_XmlPatterns::cleanupTestCase() const void tst_XmlPatterns::cleanupTestCase() const
{ {
......
...@@ -77,6 +77,7 @@ tst_XmlPatternsValidator::tst_XmlPatternsValidator() ...@@ -77,6 +77,7 @@ tst_XmlPatternsValidator::tst_XmlPatternsValidator()
void tst_XmlPatternsValidator::initTestCase() void tst_XmlPatternsValidator::initTestCase()
{ {
#ifndef QT_NO_PROCESS
QProcess process; QProcess process;
process.start(m_command); process.start(m_command);
...@@ -90,6 +91,9 @@ void tst_XmlPatternsValidator::initTestCase() ...@@ -90,6 +91,9 @@ void tst_XmlPatternsValidator::initTestCase()
).arg(m_command)) ).arg(m_command))
); );
} }
#else
QSKIP("Skipping test due to not having process support");
#endif // QT_NO_PROCESS
} }
void tst_XmlPatternsValidator::xsdSupport() void tst_XmlPatternsValidator::xsdSupport()
...@@ -101,6 +105,7 @@ void tst_XmlPatternsValidator::xsdSupport() ...@@ -101,6 +105,7 @@ void tst_XmlPatternsValidator::xsdSupport()
QSKIP("WinCE: This test uses unsupported WinCE functionality"); QSKIP("WinCE: This test uses unsupported WinCE functionality");
#endif #endif
#ifndef QT_NO_PROCESS
QFETCH(int, expectedExitCode); QFETCH(int, expectedExitCode);
QFETCH(QStringList, arguments); QFETCH(QStringList, arguments);
QFETCH(QString, cwd); QFETCH(QString, cwd);
...@@ -119,6 +124,9 @@ void tst_XmlPatternsValidator::xsdSupport() ...@@ -119,6 +124,9 @@ void tst_XmlPatternsValidator::xsdSupport()
QTextStream(stderr) << "foo:" << process.readAllStandardError(); QTextStream(stderr) << "foo:" << process.readAllStandardError();
QCOMPARE(process.exitCode(), expectedExitCode); QCOMPARE(process.exitCode(), expectedExitCode);
#else
QSKIP("Skipping test due to not having process support");
#endif // QT_NO_PROCESS
} }
void tst_XmlPatternsValidator::xsdSupport_data() const void tst_XmlPatternsValidator::xsdSupport_data() const
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment