diff options
Diffstat (limited to 'tests/auto/network/socket')
3 files changed, 18 insertions, 14 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() { diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp index 804f86b479..e0a6e3699d 100644 --- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp +++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp @@ -96,9 +96,7 @@ private slots: void setSocketDescriptor(); #endif void listenWhileListening(); -#ifndef QT_NO_PROCESS void addressReusable(); -#endif void setNewSocketDescriptorBlocking(); #ifndef QT_NO_NETWORKPROXY void invalidProxy_data(); @@ -565,9 +563,11 @@ protected: #endif // !Q_OS_WINRT }; -#ifndef QT_NO_PROCESS void tst_QTcpServer::addressReusable() { +#ifdef QT_NO_PROCESS + QSKIP("No qprocess support", SkipAll); +#else #ifdef Q_OS_LINUX QSKIP("The addressReusable test is unstable on Linux. See QTBUG-39985."); #endif @@ -616,8 +616,8 @@ void tst_QTcpServer::addressReusable() QTcpServer server; QVERIFY(server.listen(QHostAddress::LocalHost, 49199)); -} #endif +} void tst_QTcpServer::setNewSocketDescriptorBlocking() { diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp index 6e04cd9d0e..8de9987ed1 100644 --- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp +++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp @@ -95,10 +95,8 @@ private slots: void writeDatagramToNonExistingPeer(); void writeToNonExistingPeer_data(); void writeToNonExistingPeer(); -#ifndef QT_NO_PROCESS void outOfProcessConnectedClientServerTest(); void outOfProcessUnconnectedClientServerTest(); -#endif void zeroLengthDatagram(); void multicastTtlOption_data(); void multicastTtlOption(); @@ -937,9 +935,11 @@ void tst_QUdpSocket::writeToNonExistingPeer() QCOMPARE(int(sConnected.state()), int(QUdpSocket::ConnectedState)); } -#ifndef QT_NO_PROCESS void tst_QUdpSocket::outOfProcessConnectedClientServerTest() { +#ifdef QT_NO_PROCESS + QSKIP("No qprocess support", SkipAll); +#else #if defined(Q_OS_WINCE) QSKIP("This test depends on reading data from QProcess (not supported on Qt/WinCE)."); #endif @@ -996,12 +996,14 @@ void tst_QUdpSocket::outOfProcessConnectedClientServerTest() QVERIFY(clientProcess.waitForFinished()); serverProcess.kill(); QVERIFY(serverProcess.waitForFinished()); -} #endif +} -#ifndef QT_NO_PROCESS void tst_QUdpSocket::outOfProcessUnconnectedClientServerTest() { +#ifdef QT_NO_PROCESS + QSKIP("No qprocess support", SkipAll); +#else #if defined(Q_OS_WINCE) QSKIP("This test depends on reading data from QProcess (not supported on Qt/WinCE)."); #endif @@ -1059,8 +1061,8 @@ void tst_QUdpSocket::outOfProcessUnconnectedClientServerTest() QVERIFY(clientProcess.waitForFinished()); serverProcess.kill(); QVERIFY(serverProcess.waitForFinished()); -} #endif +} void tst_QUdpSocket::zeroLengthDatagram() { |