summaryrefslogtreecommitdiffstats
path: root/tests/auto/network
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/network')
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp8
-rw-r--r--tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp18
-rw-r--r--tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp38
-rw-r--r--tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp21
4 files changed, 40 insertions, 45 deletions
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 7f00ba90ca..6d7cce505d 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -263,7 +263,7 @@ private Q_SLOTS:
void ioPutToFileFromSocket();
void ioPutToFileFromLocalSocket_data();
void ioPutToFileFromLocalSocket();
-#if !defined(QT_NO_PROCESS) && !defined(Q_OS_WINCE)
+#ifndef QT_NO_PROCESS
void ioPutToFileFromProcess_data();
void ioPutToFileFromProcess();
#endif
@@ -3812,7 +3812,7 @@ void tst_QNetworkReply::ioPutToFileFromLocalSocket()
}
// Currently no stdin/out supported for Windows CE.
-#if !defined(QT_NO_PROCESS) && !defined(Q_OS_WINCE)
+#ifndef QT_NO_PROCESS
void tst_QNetworkReply::ioPutToFileFromProcess_data()
{
putToFile_data();
@@ -3820,6 +3820,9 @@ void tst_QNetworkReply::ioPutToFileFromProcess_data()
void tst_QNetworkReply::ioPutToFileFromProcess()
{
+#if defined(Q_OS_WINCE)
+ QSKIP("Currently no stdin/out supported for Windows CE");
+#else
#ifdef Q_OS_WIN
if (qstrcmp(QTest::currentDataTag(), "small") == 0)
QSKIP("When passing a CR-LF-LF sequence through Windows stdio, it gets converted, "
@@ -3852,6 +3855,7 @@ void tst_QNetworkReply::ioPutToFileFromProcess()
QCOMPARE(file.size(), qint64(data.size()));
QByteArray contents = file.readAll();
QCOMPARE(contents, data);
+#endif
}
#endif
diff --git a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
index 4638e33ee0..103ea1323e 100644
--- a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
+++ b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
@@ -85,9 +85,7 @@ private slots:
void simpleConnectToIMAP();
void udpLoopbackTest();
void udpIPv6LoopbackTest();
-#ifndef Q_OS_AIX
void broadcastTest();
-#endif
void serverTest();
void udpLoopbackPerformance();
void tcpLoopbackPerformance();
@@ -97,9 +95,7 @@ private slots:
void setSocketDescriptor();
void invalidSend();
void receiveUrgentData();
-#ifndef Q_OS_WIN
void tooManySockets();
-#endif
};
tst_PlatformSocketEngine::tst_PlatformSocketEngine()
@@ -300,10 +296,11 @@ void tst_PlatformSocketEngine::udpIPv6LoopbackTest()
}
//---------------------------------------------------------------------------
-
-#ifndef Q_OS_AIX
void tst_PlatformSocketEngine::broadcastTest()
{
+#ifdef Q_OS_AIX
+ QSKIP("Broadcast does not work on darko");
+#endif
PLATFORMSOCKETENGINE broadcastSocket;
// Initialize a regular Udp socket
@@ -338,8 +335,8 @@ void tst_PlatformSocketEngine::broadcastTest()
QVERIFY(broadcastSocket.readDatagram(response.data(), response.size())
== response.size());
QCOMPARE(response, trollMessage);
+
}
-#endif
//---------------------------------------------------------------------------
void tst_PlatformSocketEngine::serverTest()
@@ -532,11 +529,11 @@ void tst_PlatformSocketEngine::readWriteBufferSize()
}
//---------------------------------------------------------------------------
-
-// Certain windows machines suffocate and spend too much time in this test.
-#ifndef Q_OS_WIN
void tst_PlatformSocketEngine::tooManySockets()
{
+#if defined Q_OS_WIN
+ QSKIP("Certain windows machines suffocate and spend too much time in this test.");
+#endif
QList<PLATFORMSOCKETENGINE *> sockets;
PLATFORMSOCKETENGINE *socketLayer = 0;
for (;;) {
@@ -551,7 +548,6 @@ void tst_PlatformSocketEngine::tooManySockets()
qDeleteAll(sockets);
}
-#endif
//---------------------------------------------------------------------------
void tst_PlatformSocketEngine::bind()
diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
index e881d56271..3fb4333494 100644
--- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
@@ -177,16 +177,12 @@ private slots:
void socketsInThreads();
void waitForReadyReadInASlot();
void remoteCloseError();
-#ifndef Q_OS_VXWORKS
void openMessageBoxInErrorSlot();
-#endif
#ifndef Q_OS_WIN
void connectToLocalHostNoService();
#endif
void waitForConnectedInHostLookupSlot();
-#if !defined(Q_OS_WIN) && !defined(Q_OS_VXWORKS)
void waitForConnectedInHostLookupSlot2();
-#endif
void readyReadSignalsAfterWaitForReadyRead();
#ifdef Q_OS_LINUX
void linuxKernelBugLocalSocket();
@@ -197,9 +193,7 @@ private slots:
void connectionRefused();
void suddenRemoteDisconnect_data();
void suddenRemoteDisconnect();
-#ifndef Q_OS_VXWORKS
void connectToMultiIP();
-#endif
void moveToThread0();
void increaseReadBufferSize();
void taskQtBug5799ConnectionErrorWaitForConnected();
@@ -225,9 +219,7 @@ protected slots:
void downloadBigFileSlot();
void recursiveReadyReadSlot();
void waitForReadyReadInASlotSlot();
-#ifndef Q_OS_VXWORKS
void messageBoxSlot();
-#endif
void hostLookupSlot();
void abortiveClose_abortSlot();
void remoteCloseErrorSlot();
@@ -1826,10 +1818,9 @@ void tst_QTcpSocket::remoteCloseErrorSlot()
static_cast<QTcpSocket *>(sender())->close();
}
-// VxWorks has no default gui
-#ifndef Q_OS_VXWORKS
void tst_QTcpSocket::messageBoxSlot()
{
+#if !defined(Q_OS_VXWORKS) // no gui
QTcpSocket *socket = qobject_cast<QTcpSocket *>(sender());
socket->deleteLater();
QMessageBox box;
@@ -1840,15 +1831,14 @@ void tst_QTcpSocket::messageBoxSlot()
// Fire a non-0 singleshot to leave time for the delete
QTimer::singleShot(250, this, SLOT(exitLoopSlot()));
-}
#endif
-
+}
//----------------------------------------------------------------------------------
-
-// VxWorks has no default gui
-#ifndef Q_OS_VXWORKS
void tst_QTcpSocket::openMessageBoxInErrorSlot()
{
+#if defined(Q_OS_VXWORKS) // no gui
+ QSKIP("no default gui available on VxWorks");
+#else
QTcpSocket *socket = newSocket();
QPointer<QTcpSocket> p(socket);
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(messageBoxSlot()));
@@ -1856,8 +1846,8 @@ void tst_QTcpSocket::openMessageBoxInErrorSlot()
socket->connectToHost("hostnotfoundhostnotfound.troll.no", 9999); // Host not found, fyi
enterLoop(30);
QVERIFY(!p);
-}
#endif
+}
//----------------------------------------------------------------------------------
#ifndef Q_OS_WIN
@@ -1978,10 +1968,12 @@ public slots:
};
//----------------------------------------------------------------------------------
-
-#if !defined(Q_OS_WIN) && !defined(Q_OS_VXWORKS)
void tst_QTcpSocket::waitForConnectedInHostLookupSlot2()
{
+#if defined(Q_OS_WIN) || defined(Q_OS_VXWORKS)
+ QSKIP("waitForConnectedInHostLookupSlot2 is not run on Windows and VxWorks");
+#else
+
Foo foo;
QPushButton top("Go", 0);
top.show();
@@ -1996,8 +1988,8 @@ void tst_QTcpSocket::waitForConnectedInHostLookupSlot2()
QVERIFY(foo.attemptedToConnect);
QCOMPARE(foo.count, 1);
-}
#endif
+}
//----------------------------------------------------------------------------------
void tst_QTcpSocket::readyReadSignalsAfterWaitForReadyRead()
@@ -2280,12 +2272,12 @@ void tst_QTcpSocket::suddenRemoteDisconnect()
//----------------------------------------------------------------------------------
-// VxSim in standard config doesn't even run a DNS resolver.
-#ifndef Q_OS_VXWORKS
void tst_QTcpSocket::connectToMultiIP()
{
QSKIP("TODO: setup DNS in the new network");
-
+#if defined(Q_OS_VXWORKS)
+ QSKIP("VxSim in standard config doesn't even run a DNS resolver");
+#else
QFETCH_GLOBAL(bool, ssl);
if (ssl)
return;
@@ -2313,8 +2305,8 @@ void tst_QTcpSocket::connectToMultiIP()
QCOMPARE(socket->error(), QAbstractSocket::SocketTimeoutError);
delete socket;
-}
#endif
+}
//----------------------------------------------------------------------------------
void tst_QTcpSocket::moveToThread0()
diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
index a44d724d63..f737b94e5e 100644
--- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
+++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
@@ -85,9 +85,7 @@ public slots:
private slots:
void constructing();
void unconnectedServerAndClientTest();
-#ifndef Q_OS_AIX
void broadcasting();
-#endif
void loop_data();
void loop();
void ipv6Loop_data();
@@ -102,7 +100,7 @@ private slots:
void writeDatagramToNonExistingPeer();
void writeToNonExistingPeer_data();
void writeToNonExistingPeer();
-#if !defined(Q_OS_WINCE) && !defined(QT_NO_PROCESS)
+#ifndef QT_NO_PROCESS
void outOfProcessConnectedClientServerTest();
void outOfProcessUnconnectedClientServerTest();
#endif
@@ -240,7 +238,6 @@ void tst_QUdpSocket::unconnectedServerAndClientTest()
//----------------------------------------------------------------------------------
-#ifndef Q_OS_AIX
void tst_QUdpSocket::broadcasting()
{
QFETCH_GLOBAL(bool, setProxy);
@@ -249,6 +246,9 @@ void tst_QUdpSocket::broadcasting()
if (proxyType == QNetworkProxy::Socks5Proxy)
QSKIP("With socks5 Broadcast is not supported.");
}
+#ifdef Q_OS_AIX
+ QSKIP("Broadcast does not work on darko");
+#endif
const char *message[] = {"Yo mista", "", "Yo", "Wassap"};
QList<QHostAddress> broadcastAddresses;
@@ -309,7 +309,6 @@ void tst_QUdpSocket::broadcasting()
}
}
}
-#endif
//----------------------------------------------------------------------------------
@@ -787,10 +786,12 @@ void tst_QUdpSocket::writeToNonExistingPeer()
QCOMPARE(int(sConnected.state()), int(QUdpSocket::ConnectedState));
}
-// This test depends on reading data from QProcess (not supported on Qt/WinCE).
-#if !defined(Q_OS_WINCE) && !defined(QT_NO_PROCESS)
+#ifndef QT_NO_PROCESS
void tst_QUdpSocket::outOfProcessConnectedClientServerTest()
{
+#if defined(Q_OS_WINCE)
+ QSKIP("This test depends on reading data from QProcess (not supported on Qt/WinCE).");
+#endif
QProcess serverProcess;
serverProcess.start(QLatin1String("clientserver/clientserver server 1 1"),
QIODevice::ReadWrite | QIODevice::Text);
@@ -847,10 +848,12 @@ void tst_QUdpSocket::outOfProcessConnectedClientServerTest()
}
#endif
-// This test depends on reading data from QProcess (not supported on Qt/WinCE).
-#if !defined(Q_OS_WINCE) && !defined(QT_NO_PROCESS)
+#ifndef QT_NO_PROCESS
void tst_QUdpSocket::outOfProcessUnconnectedClientServerTest()
{
+#if defined(Q_OS_WINCE)
+ QSKIP("This test depends on reading data from QProcess (not supported on Qt/WinCE).");
+#endif
QProcess serverProcess;
serverProcess.start(QLatin1String("clientserver/clientserver server 1 1"),
QIODevice::ReadWrite | QIODevice::Text);