summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qtcpsocket/tst_qtcpsocket.cpp')
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
index 9e55764..6b0a5be 100644
--- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
@@ -60,10 +60,12 @@
#include <QHostAddress>
#include <QHostInfo>
#include <QMap>
+#ifndef Q_OS_VXWORKS
#include <QMessageBox>
+#include <QPushButton>
+#endif
#include <QPointer>
#include <QProcess>
-#include <QPushButton>
#include <QStringList>
#include <QTcpServer>
#include <QTcpSocket>
@@ -172,9 +174,7 @@ private slots:
void connectToLocalHostNoService();
#endif
void waitForConnectedInHostLookupSlot();
-#ifndef Q_OS_WIN
void waitForConnectedInHostLookupSlot2();
-#endif
void readyReadSignalsAfterWaitForReadyRead();
#ifdef Q_OS_LINUX
void linuxKernelBugLocalSocket();
@@ -1573,6 +1573,7 @@ void tst_QTcpSocket::remoteCloseErrorSlot()
void tst_QTcpSocket::messageBoxSlot()
{
+#if !defined(Q_OS_VXWORKS) // no gui
QTcpSocket *socket = qobject_cast<QTcpSocket *>(sender());
socket->deleteLater();
QMessageBox box;
@@ -1583,10 +1584,14 @@ void tst_QTcpSocket::messageBoxSlot()
// Fire a non-0 singleshot to leave time for the delete
QTimer::singleShot(250, this, SLOT(exitLoopSlot()));
+#endif
}
//----------------------------------------------------------------------------------
void tst_QTcpSocket::openMessageBoxInErrorSlot()
{
+#if defined(Q_OS_VXWORKS) // no gui
+ QSKIP("no default gui available on VxWorks", SkipAll);
+#else
QTcpSocket *socket = newSocket();
QPointer<QTcpSocket> p(socket);
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(messageBoxSlot()));
@@ -1594,6 +1599,7 @@ void tst_QTcpSocket::openMessageBoxInErrorSlot()
socket->connectToHost("hostnotfoundhostnotfound.troll.no", 9999); // Host not found, fyi
enterLoop(30);
QVERIFY(!p);
+#endif
}
//----------------------------------------------------------------------------------
@@ -1712,9 +1718,11 @@ public slots:
};
//----------------------------------------------------------------------------------
-#ifndef Q_OS_WIN
void tst_QTcpSocket::waitForConnectedInHostLookupSlot2()
{
+#if defined(Q_OS_WIN) || defined(Q_OS_VXWORKS)
+ QSKIP("waitForConnectedInHostLookupSlot2 is not run on Windows and VxWorks", SkipAll);
+#else
Foo foo;
QPushButton top("Go", 0);
@@ -1730,8 +1738,8 @@ void tst_QTcpSocket::waitForConnectedInHostLookupSlot2()
QVERIFY(foo.attemptedToConnect);
QCOMPARE(foo.count, 1);
-}
#endif
+}
//----------------------------------------------------------------------------------
void tst_QTcpSocket::readyReadSignalsAfterWaitForReadyRead()
@@ -1965,7 +1973,7 @@ void tst_QTcpSocket::suddenRemoteDisconnect_data()
void tst_QTcpSocket::suddenRemoteDisconnect()
{
-#if defined(Q_OS_WINCE)
+#if defined(Q_OS_WINCE) || defined(Q_OS_VXWORKS)
QSKIP("stressTest subprocess needs Qt3Support", SkipAll);
#else
QFETCH(QString, client);
@@ -2022,6 +2030,9 @@ void tst_QTcpSocket::connectToMultiIP()
{
QSKIP("TODO: setup DNS in the new network", SkipAll);
+#if defined(Q_OS_VXWORKS)
+ QSKIP("VxSim in standard config doesn't even run a DNS resolver", SkipAll);
+#else
QFETCH_GLOBAL(bool, ssl);
if (ssl)
return;
@@ -2049,6 +2060,7 @@ void tst_QTcpSocket::connectToMultiIP()
QCOMPARE(socket->error(), QAbstractSocket::SocketTimeoutError);
delete socket;
+#endif
}
//----------------------------------------------------------------------------------