summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/socket/qlocalsocket
diff options
context:
space:
mode:
authorMarko Kangas <marko.kangas@theqtcompany.com>2015-02-13 13:01:57 +0200
committerMarko Kangas <marko.kangas@theqtcompany.com>2015-03-16 09:34:15 +0000
commitbc69fd1dfe30876909091d93a07640a498a24c0c (patch)
tree6af7b94832fcd5c596e54338266d43772ca152e6 /tests/auto/network/socket/qlocalsocket
parentf1b3244ac16cd5b306450c53fcbd4ee673bfe53b (diff)
Skip instead of entirely excluding tests with disabled features
Properly QSKIP tests that use disabled QProcess and symlink features instead of excluding them silently by #ifdef. Other reason is that moc doesn't respect QT_NO_* defines in class definition which causes build issues on some platforms. Change-Id: I041020f7452f7d36c7ec8a5866a4ba5eb23d1f94 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
Diffstat (limited to 'tests/auto/network/socket/qlocalsocket')
-rw-r--r--tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
index e0020c2968..4881d86937 100644
--- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
@@ -88,10 +88,8 @@ private slots:
void threadedConnection_data();
void threadedConnection();
-#ifndef QT_NO_PROCESS
void processConnection_data();
void processConnection();
-#endif
void longPath();
void waitForDisconnect();
@@ -784,7 +782,6 @@ void tst_QLocalSocket::threadedConnection()
}
}
-#ifndef QT_NO_PROCESS
void tst_QLocalSocket::processConnection_data()
{
QTest::addColumn<int>("processes");
@@ -794,6 +791,7 @@ void tst_QLocalSocket::processConnection_data()
QTest::newRow("30 clients") << 30;
}
+#ifndef QT_NO_PROCESS
class ProcessOutputDumper
{
public:
@@ -815,12 +813,16 @@ public:
private:
QProcess *process;
};
+#endif
/*!
Create external processes that produce and consume.
*/
void tst_QLocalSocket::processConnection()
{
+#ifdef QT_NO_PROCESS
+ QSKIP("No qprocess support", SkipAll);
+#else
#ifdef Q_OS_MAC
QSKIP("The processConnection test is unstable on Mac. See QTBUG-39986.");
#endif
@@ -860,8 +862,8 @@ void tst_QLocalSocket::processConnection()
}
producer.waitForFinished(15000);
producerOutputDumper.clear();
-}
#endif
+}
void tst_QLocalSocket::longPath()
{