Avoid using QSKIP in lieu of compile-time checks
QSKIP is intended to be used to skip test functions that are found at run-time to be inapplicable or unsafe. If a test function can be determined to be inapplicable at compile-time, the entire test function should be omitted instead of replacing the body of the test function with a QSKIP, which only serves to slow down test runs and to inflate test run-rates with empty, inapplicable tests. Task-number: QTQAINFRA-278 Change-Id: I21664d8d92b27c26c64789fc08d0ec7b8988456a Reviewed-on: http://codereview.qt-project.org/5941 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
parent
fe90725ced
commit
9d2ff58f36
@ -97,8 +97,10 @@ private slots:
|
|||||||
void proxy2();
|
void proxy2();
|
||||||
void proxy3();
|
void proxy3();
|
||||||
void postAuthNtlm();
|
void postAuthNtlm();
|
||||||
|
#ifndef QT_NO_OPENSSL
|
||||||
void proxyAndSsl();
|
void proxyAndSsl();
|
||||||
void cachingProxyAndSsl();
|
void cachingProxyAndSsl();
|
||||||
|
#endif
|
||||||
void reconnect();
|
void reconnect();
|
||||||
void setSocket();
|
void setSocket();
|
||||||
void unexpectedRemoteClose();
|
void unexpectedRemoteClose();
|
||||||
@ -1357,11 +1359,9 @@ void tst_QHttp::postAuthNtlm()
|
|||||||
QVERIFY(!QTestEventLoop::instance().timeout());
|
QVERIFY(!QTestEventLoop::instance().timeout());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef QT_NO_OPENSSL
|
||||||
void tst_QHttp::proxyAndSsl()
|
void tst_QHttp::proxyAndSsl()
|
||||||
{
|
{
|
||||||
#ifdef QT_NO_OPENSSL
|
|
||||||
QSKIP("No OpenSSL support in this platform", SkipAll);
|
|
||||||
#else
|
|
||||||
QFETCH_GLOBAL(bool, setProxy);
|
QFETCH_GLOBAL(bool, setProxy);
|
||||||
if (setProxy)
|
if (setProxy)
|
||||||
return;
|
return;
|
||||||
@ -1388,14 +1388,12 @@ void tst_QHttp::proxyAndSsl()
|
|||||||
QHttpResponseHeader header = http.lastResponse();
|
QHttpResponseHeader header = http.lastResponse();
|
||||||
QVERIFY(header.isValid());
|
QVERIFY(header.isValid());
|
||||||
QVERIFY(header.statusCode() < 400); // Should be 200, but as long as it's not an error, we're happy
|
QVERIFY(header.statusCode() < 400); // Should be 200, but as long as it's not an error, we're happy
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef QT_NO_OPENSSL
|
||||||
void tst_QHttp::cachingProxyAndSsl()
|
void tst_QHttp::cachingProxyAndSsl()
|
||||||
{
|
{
|
||||||
#ifdef QT_NO_OPENSSL
|
|
||||||
QSKIP("No OpenSSL support in this platform", SkipAll);
|
|
||||||
#else
|
|
||||||
QFETCH_GLOBAL(bool, setProxy);
|
QFETCH_GLOBAL(bool, setProxy);
|
||||||
if (setProxy)
|
if (setProxy)
|
||||||
return;
|
return;
|
||||||
@ -1420,8 +1418,8 @@ void tst_QHttp::cachingProxyAndSsl()
|
|||||||
|
|
||||||
QHttpResponseHeader header = http.lastResponse();
|
QHttpResponseHeader header = http.lastResponse();
|
||||||
QVERIFY(!header.isValid());
|
QVERIFY(!header.isValid());
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void tst_QHttp::emptyBodyInReply()
|
void tst_QHttp::emptyBodyInReply()
|
||||||
{
|
{
|
||||||
|
@ -54,8 +54,10 @@ private slots:
|
|||||||
void setCookiesFromUrl();
|
void setCookiesFromUrl();
|
||||||
void cookiesForUrl_data();
|
void cookiesForUrl_data();
|
||||||
void cookiesForUrl();
|
void cookiesForUrl();
|
||||||
|
#ifdef QT_BUILD_INTERNAL
|
||||||
void effectiveTLDs_data();
|
void effectiveTLDs_data();
|
||||||
void effectiveTLDs();
|
void effectiveTLDs();
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@ -362,6 +364,8 @@ void tst_QNetworkCookieJar::cookiesForUrl()
|
|||||||
QCOMPARE(result, expectedResult);
|
QCOMPARE(result, expectedResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This test requires private API.
|
||||||
|
#ifdef QT_BUILD_INTERNAL
|
||||||
void tst_QNetworkCookieJar::effectiveTLDs_data()
|
void tst_QNetworkCookieJar::effectiveTLDs_data()
|
||||||
{
|
{
|
||||||
QTest::addColumn<QString>("domain");
|
QTest::addColumn<QString>("domain");
|
||||||
@ -433,13 +437,11 @@ void tst_QNetworkCookieJar::effectiveTLDs_data()
|
|||||||
|
|
||||||
void tst_QNetworkCookieJar::effectiveTLDs()
|
void tst_QNetworkCookieJar::effectiveTLDs()
|
||||||
{
|
{
|
||||||
#ifndef QT_BUILD_INTERNAL
|
|
||||||
QSKIP("Test requires private API", SkipAll);
|
|
||||||
#endif
|
|
||||||
QFETCH(QString, domain);
|
QFETCH(QString, domain);
|
||||||
QFETCH(bool, isTLD);
|
QFETCH(bool, isTLD);
|
||||||
QCOMPARE(qIsEffectiveTLD(domain), isTLD);
|
QCOMPARE(qIsEffectiveTLD(domain), isTLD);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QTEST_MAIN(tst_QNetworkCookieJar)
|
QTEST_MAIN(tst_QNetworkCookieJar)
|
||||||
#include "tst_qnetworkcookiejar.moc"
|
#include "tst_qnetworkcookiejar.moc"
|
||||||
|
@ -262,8 +262,10 @@ private Q_SLOTS:
|
|||||||
void ioPutToFileFromSocket();
|
void ioPutToFileFromSocket();
|
||||||
void ioPutToFileFromLocalSocket_data();
|
void ioPutToFileFromLocalSocket_data();
|
||||||
void ioPutToFileFromLocalSocket();
|
void ioPutToFileFromLocalSocket();
|
||||||
|
#if !defined(QT_NO_PROCESS) && !defined(Q_OS_WINCE)
|
||||||
void ioPutToFileFromProcess_data();
|
void ioPutToFileFromProcess_data();
|
||||||
void ioPutToFileFromProcess();
|
void ioPutToFileFromProcess();
|
||||||
|
#endif
|
||||||
void ioPutToFtpFromFile_data();
|
void ioPutToFtpFromFile_data();
|
||||||
void ioPutToFtpFromFile();
|
void ioPutToFtpFromFile();
|
||||||
void ioPutToHttpFromFile_data();
|
void ioPutToHttpFromFile_data();
|
||||||
@ -3744,6 +3746,8 @@ void tst_QNetworkReply::ioPutToFileFromLocalSocket()
|
|||||||
QCOMPARE(contents, data);
|
QCOMPARE(contents, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Currently no stdin/out supported for Windows CE.
|
||||||
|
#if !defined(QT_NO_PROCESS) && !defined(Q_OS_WINCE)
|
||||||
void tst_QNetworkReply::ioPutToFileFromProcess_data()
|
void tst_QNetworkReply::ioPutToFileFromProcess_data()
|
||||||
{
|
{
|
||||||
putToFile_data();
|
putToFile_data();
|
||||||
@ -3751,19 +3755,12 @@ void tst_QNetworkReply::ioPutToFileFromProcess_data()
|
|||||||
|
|
||||||
void tst_QNetworkReply::ioPutToFileFromProcess()
|
void tst_QNetworkReply::ioPutToFileFromProcess()
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_WINCE)
|
|
||||||
QSKIP("Currently no stdin/out supported for Windows CE", SkipAll);
|
|
||||||
#else
|
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
if (qstrcmp(QTest::currentDataTag(), "small") == 0)
|
if (qstrcmp(QTest::currentDataTag(), "small") == 0)
|
||||||
QSKIP("When passing a CR-LF-LF sequence through Windows stdio, it gets converted, "
|
QSKIP("When passing a CR-LF-LF sequence through Windows stdio, it gets converted, "
|
||||||
"so this test fails. Disabled on Windows", SkipSingle);
|
"so this test fails. Disabled on Windows", SkipSingle);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(QT_NO_PROCESS)
|
|
||||||
QSKIP("Qt was compiled with QT_NO_PROCESS", SkipAll);
|
|
||||||
#else
|
|
||||||
QFile file(testFileName);
|
QFile file(testFileName);
|
||||||
|
|
||||||
QUrl url = QUrl::fromLocalFile(file.fileName());
|
QUrl url = QUrl::fromLocalFile(file.fileName());
|
||||||
@ -3790,9 +3787,8 @@ void tst_QNetworkReply::ioPutToFileFromProcess()
|
|||||||
QCOMPARE(file.size(), qint64(data.size()));
|
QCOMPARE(file.size(), qint64(data.size()));
|
||||||
QByteArray contents = file.readAll();
|
QByteArray contents = file.readAll();
|
||||||
QCOMPARE(contents, data);
|
QCOMPARE(contents, data);
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void tst_QNetworkReply::ioPutToFtpFromFile_data()
|
void tst_QNetworkReply::ioPutToFtpFromFile_data()
|
||||||
{
|
{
|
||||||
|
@ -85,7 +85,9 @@ private slots:
|
|||||||
void simpleConnectToIMAP();
|
void simpleConnectToIMAP();
|
||||||
void udpLoopbackTest();
|
void udpLoopbackTest();
|
||||||
void udpIPv6LoopbackTest();
|
void udpIPv6LoopbackTest();
|
||||||
|
#ifndef Q_OS_AIX
|
||||||
void broadcastTest();
|
void broadcastTest();
|
||||||
|
#endif
|
||||||
void serverTest();
|
void serverTest();
|
||||||
void udpLoopbackPerformance();
|
void udpLoopbackPerformance();
|
||||||
void tcpLoopbackPerformance();
|
void tcpLoopbackPerformance();
|
||||||
@ -95,7 +97,9 @@ private slots:
|
|||||||
void setSocketDescriptor();
|
void setSocketDescriptor();
|
||||||
void invalidSend();
|
void invalidSend();
|
||||||
void receiveUrgentData();
|
void receiveUrgentData();
|
||||||
|
#ifndef Q_OS_WIN
|
||||||
void tooManySockets();
|
void tooManySockets();
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
tst_PlatformSocketEngine::tst_PlatformSocketEngine()
|
tst_PlatformSocketEngine::tst_PlatformSocketEngine()
|
||||||
@ -296,11 +300,10 @@ void tst_PlatformSocketEngine::udpIPv6LoopbackTest()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef Q_OS_AIX
|
||||||
void tst_PlatformSocketEngine::broadcastTest()
|
void tst_PlatformSocketEngine::broadcastTest()
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_AIX
|
|
||||||
QSKIP("Broadcast does not work on darko", SkipAll);
|
|
||||||
#endif
|
|
||||||
PLATFORMSOCKETENGINE broadcastSocket;
|
PLATFORMSOCKETENGINE broadcastSocket;
|
||||||
|
|
||||||
// Initialize a regular Udp socket
|
// Initialize a regular Udp socket
|
||||||
@ -335,8 +338,8 @@ void tst_PlatformSocketEngine::broadcastTest()
|
|||||||
QVERIFY(broadcastSocket.readDatagram(response.data(), response.size())
|
QVERIFY(broadcastSocket.readDatagram(response.data(), response.size())
|
||||||
== response.size());
|
== response.size());
|
||||||
QCOMPARE(response, trollMessage);
|
QCOMPARE(response, trollMessage);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void tst_PlatformSocketEngine::serverTest()
|
void tst_PlatformSocketEngine::serverTest()
|
||||||
@ -529,11 +532,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()
|
void tst_PlatformSocketEngine::tooManySockets()
|
||||||
{
|
{
|
||||||
#if defined Q_OS_WIN
|
|
||||||
QSKIP("Certain windows machines suffocate and spend too much time in this test.", SkipAll);
|
|
||||||
#endif
|
|
||||||
QList<PLATFORMSOCKETENGINE *> sockets;
|
QList<PLATFORMSOCKETENGINE *> sockets;
|
||||||
PLATFORMSOCKETENGINE *socketLayer = 0;
|
PLATFORMSOCKETENGINE *socketLayer = 0;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
@ -548,6 +551,7 @@ void tst_PlatformSocketEngine::tooManySockets()
|
|||||||
|
|
||||||
qDeleteAll(sockets);
|
qDeleteAll(sockets);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void tst_PlatformSocketEngine::bind()
|
void tst_PlatformSocketEngine::bind()
|
||||||
|
@ -92,8 +92,10 @@ private slots:
|
|||||||
void threadedConnection_data();
|
void threadedConnection_data();
|
||||||
void threadedConnection();
|
void threadedConnection();
|
||||||
|
|
||||||
|
#ifndef QT_NO_PROCESS
|
||||||
void processConnection_data();
|
void processConnection_data();
|
||||||
void processConnection();
|
void processConnection();
|
||||||
|
#endif
|
||||||
|
|
||||||
void longPath();
|
void longPath();
|
||||||
void waitForDisconnect();
|
void waitForDisconnect();
|
||||||
@ -739,6 +741,7 @@ void tst_QLocalSocket::threadedConnection()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef QT_NO_PROCESS
|
||||||
void tst_QLocalSocket::processConnection_data()
|
void tst_QLocalSocket::processConnection_data()
|
||||||
{
|
{
|
||||||
QTest::addColumn<int>("processes");
|
QTest::addColumn<int>("processes");
|
||||||
@ -755,9 +758,6 @@ void tst_QLocalSocket::processConnection_data()
|
|||||||
*/
|
*/
|
||||||
void tst_QLocalSocket::processConnection()
|
void tst_QLocalSocket::processConnection()
|
||||||
{
|
{
|
||||||
#if defined(QT_NO_PROCESS)
|
|
||||||
QSKIP("Qt was compiled with QT_NO_PROCESS", SkipAll);
|
|
||||||
#else
|
|
||||||
QFETCH(int, processes);
|
QFETCH(int, processes);
|
||||||
QStringList serverArguments = QStringList() << SRCDIR "lackey/scripts/server.js" << QString::number(processes);
|
QStringList serverArguments = QStringList() << SRCDIR "lackey/scripts/server.js" << QString::number(processes);
|
||||||
QProcess producer;
|
QProcess producer;
|
||||||
@ -789,8 +789,8 @@ void tst_QLocalSocket::processConnection()
|
|||||||
delete consumer;
|
delete consumer;
|
||||||
}
|
}
|
||||||
producer.waitForFinished(15000);
|
producer.waitForFinished(15000);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void tst_QLocalSocket::longPath()
|
void tst_QLocalSocket::longPath()
|
||||||
{
|
{
|
||||||
|
@ -105,7 +105,9 @@ private slots:
|
|||||||
void waitForConnectionTest();
|
void waitForConnectionTest();
|
||||||
void setSocketDescriptor();
|
void setSocketDescriptor();
|
||||||
void listenWhileListening();
|
void listenWhileListening();
|
||||||
|
#ifndef QT_NO_PROCESS
|
||||||
void addressReusable();
|
void addressReusable();
|
||||||
|
#endif
|
||||||
void setNewSocketDescriptorBlocking();
|
void setNewSocketDescriptorBlocking();
|
||||||
void invalidProxy_data();
|
void invalidProxy_data();
|
||||||
void invalidProxy();
|
void invalidProxy();
|
||||||
@ -525,12 +527,9 @@ protected:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef QT_NO_PROCESS
|
||||||
void tst_QTcpServer::addressReusable()
|
void tst_QTcpServer::addressReusable()
|
||||||
{
|
{
|
||||||
#if defined(QT_NO_PROCESS)
|
|
||||||
QSKIP("Qt was compiled with QT_NO_PROCESS", SkipAll);
|
|
||||||
#else
|
|
||||||
|
|
||||||
QFETCH_GLOBAL(bool, setProxy);
|
QFETCH_GLOBAL(bool, setProxy);
|
||||||
if (setProxy) {
|
if (setProxy) {
|
||||||
QFETCH_GLOBAL(int, proxyType);
|
QFETCH_GLOBAL(int, proxyType);
|
||||||
@ -567,8 +566,8 @@ void tst_QTcpServer::addressReusable()
|
|||||||
|
|
||||||
QTcpServer server;
|
QTcpServer server;
|
||||||
QVERIFY(server.listen(QHostAddress::LocalHost, 49199));
|
QVERIFY(server.listen(QHostAddress::LocalHost, 49199));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void tst_QTcpServer::setNewSocketDescriptorBlocking()
|
void tst_QTcpServer::setNewSocketDescriptorBlocking()
|
||||||
{
|
{
|
||||||
|
@ -176,12 +176,16 @@ private slots:
|
|||||||
void socketsInThreads();
|
void socketsInThreads();
|
||||||
void waitForReadyReadInASlot();
|
void waitForReadyReadInASlot();
|
||||||
void remoteCloseError();
|
void remoteCloseError();
|
||||||
|
#ifndef Q_OS_VXWORKS
|
||||||
void openMessageBoxInErrorSlot();
|
void openMessageBoxInErrorSlot();
|
||||||
|
#endif
|
||||||
#ifndef Q_OS_WIN
|
#ifndef Q_OS_WIN
|
||||||
void connectToLocalHostNoService();
|
void connectToLocalHostNoService();
|
||||||
#endif
|
#endif
|
||||||
void waitForConnectedInHostLookupSlot();
|
void waitForConnectedInHostLookupSlot();
|
||||||
|
#if !defined(Q_OS_WIN) && !defined(Q_OS_VXWORKS)
|
||||||
void waitForConnectedInHostLookupSlot2();
|
void waitForConnectedInHostLookupSlot2();
|
||||||
|
#endif
|
||||||
void readyReadSignalsAfterWaitForReadyRead();
|
void readyReadSignalsAfterWaitForReadyRead();
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
void linuxKernelBugLocalSocket();
|
void linuxKernelBugLocalSocket();
|
||||||
@ -192,7 +196,9 @@ private slots:
|
|||||||
void connectionRefused();
|
void connectionRefused();
|
||||||
void suddenRemoteDisconnect_data();
|
void suddenRemoteDisconnect_data();
|
||||||
void suddenRemoteDisconnect();
|
void suddenRemoteDisconnect();
|
||||||
|
#ifndef Q_OS_VXWORKS
|
||||||
void connectToMultiIP();
|
void connectToMultiIP();
|
||||||
|
#endif
|
||||||
void moveToThread0();
|
void moveToThread0();
|
||||||
void increaseReadBufferSize();
|
void increaseReadBufferSize();
|
||||||
void taskQtBug5799ConnectionErrorWaitForConnected();
|
void taskQtBug5799ConnectionErrorWaitForConnected();
|
||||||
@ -218,7 +224,9 @@ protected slots:
|
|||||||
void downloadBigFileSlot();
|
void downloadBigFileSlot();
|
||||||
void recursiveReadyReadSlot();
|
void recursiveReadyReadSlot();
|
||||||
void waitForReadyReadInASlotSlot();
|
void waitForReadyReadInASlotSlot();
|
||||||
|
#ifndef Q_OS_VXWORKS
|
||||||
void messageBoxSlot();
|
void messageBoxSlot();
|
||||||
|
#endif
|
||||||
void hostLookupSlot();
|
void hostLookupSlot();
|
||||||
void abortiveClose_abortSlot();
|
void abortiveClose_abortSlot();
|
||||||
void remoteCloseErrorSlot();
|
void remoteCloseErrorSlot();
|
||||||
@ -1759,9 +1767,10 @@ void tst_QTcpSocket::remoteCloseErrorSlot()
|
|||||||
static_cast<QTcpSocket *>(sender())->close();
|
static_cast<QTcpSocket *>(sender())->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// VxWorks has no default gui
|
||||||
|
#ifndef Q_OS_VXWORKS
|
||||||
void tst_QTcpSocket::messageBoxSlot()
|
void tst_QTcpSocket::messageBoxSlot()
|
||||||
{
|
{
|
||||||
#if !defined(Q_OS_VXWORKS) // no gui
|
|
||||||
QTcpSocket *socket = qobject_cast<QTcpSocket *>(sender());
|
QTcpSocket *socket = qobject_cast<QTcpSocket *>(sender());
|
||||||
socket->deleteLater();
|
socket->deleteLater();
|
||||||
QMessageBox box;
|
QMessageBox box;
|
||||||
@ -1772,14 +1781,15 @@ void tst_QTcpSocket::messageBoxSlot()
|
|||||||
|
|
||||||
// Fire a non-0 singleshot to leave time for the delete
|
// Fire a non-0 singleshot to leave time for the delete
|
||||||
QTimer::singleShot(250, this, SLOT(exitLoopSlot()));
|
QTimer::singleShot(250, this, SLOT(exitLoopSlot()));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// VxWorks has no default gui
|
||||||
|
#ifndef Q_OS_VXWORKS
|
||||||
void tst_QTcpSocket::openMessageBoxInErrorSlot()
|
void tst_QTcpSocket::openMessageBoxInErrorSlot()
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_VXWORKS) // no gui
|
|
||||||
QSKIP("no default gui available on VxWorks", SkipAll);
|
|
||||||
#else
|
|
||||||
QTcpSocket *socket = newSocket();
|
QTcpSocket *socket = newSocket();
|
||||||
QPointer<QTcpSocket> p(socket);
|
QPointer<QTcpSocket> p(socket);
|
||||||
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(messageBoxSlot()));
|
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(messageBoxSlot()));
|
||||||
@ -1787,8 +1797,8 @@ void tst_QTcpSocket::openMessageBoxInErrorSlot()
|
|||||||
socket->connectToHost("hostnotfoundhostnotfound.troll.no", 9999); // Host not found, fyi
|
socket->connectToHost("hostnotfoundhostnotfound.troll.no", 9999); // Host not found, fyi
|
||||||
enterLoop(30);
|
enterLoop(30);
|
||||||
QVERIFY(!p);
|
QVERIFY(!p);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
#ifndef Q_OS_WIN
|
#ifndef Q_OS_WIN
|
||||||
@ -1909,12 +1919,10 @@ public slots:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if !defined(Q_OS_WIN) && !defined(Q_OS_VXWORKS)
|
||||||
void tst_QTcpSocket::waitForConnectedInHostLookupSlot2()
|
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;
|
Foo foo;
|
||||||
QPushButton top("Go", 0);
|
QPushButton top("Go", 0);
|
||||||
top.show();
|
top.show();
|
||||||
@ -1929,8 +1937,8 @@ void tst_QTcpSocket::waitForConnectedInHostLookupSlot2()
|
|||||||
|
|
||||||
QVERIFY(foo.attemptedToConnect);
|
QVERIFY(foo.attemptedToConnect);
|
||||||
QCOMPARE(foo.count, 1);
|
QCOMPARE(foo.count, 1);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
void tst_QTcpSocket::readyReadSignalsAfterWaitForReadyRead()
|
void tst_QTcpSocket::readyReadSignalsAfterWaitForReadyRead()
|
||||||
@ -2212,13 +2220,13 @@ void tst_QTcpSocket::suddenRemoteDisconnect()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// VxSim in standard config doesn't even run a DNS resolver.
|
||||||
|
#ifndef Q_OS_VXWORKS
|
||||||
void tst_QTcpSocket::connectToMultiIP()
|
void tst_QTcpSocket::connectToMultiIP()
|
||||||
{
|
{
|
||||||
QSKIP("TODO: setup DNS in the new network", SkipAll);
|
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);
|
QFETCH_GLOBAL(bool, ssl);
|
||||||
if (ssl)
|
if (ssl)
|
||||||
return;
|
return;
|
||||||
@ -2246,8 +2254,8 @@ void tst_QTcpSocket::connectToMultiIP()
|
|||||||
QCOMPARE(socket->error(), QAbstractSocket::SocketTimeoutError);
|
QCOMPARE(socket->error(), QAbstractSocket::SocketTimeoutError);
|
||||||
|
|
||||||
delete socket;
|
delete socket;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
void tst_QTcpSocket::moveToThread0()
|
void tst_QTcpSocket::moveToThread0()
|
||||||
|
@ -85,7 +85,9 @@ public slots:
|
|||||||
private slots:
|
private slots:
|
||||||
void constructing();
|
void constructing();
|
||||||
void unconnectedServerAndClientTest();
|
void unconnectedServerAndClientTest();
|
||||||
|
#ifndef Q_OS_AIX
|
||||||
void broadcasting();
|
void broadcasting();
|
||||||
|
#endif
|
||||||
void loop_data();
|
void loop_data();
|
||||||
void loop();
|
void loop();
|
||||||
void ipv6Loop_data();
|
void ipv6Loop_data();
|
||||||
@ -100,8 +102,10 @@ private slots:
|
|||||||
void writeDatagramToNonExistingPeer();
|
void writeDatagramToNonExistingPeer();
|
||||||
void writeToNonExistingPeer_data();
|
void writeToNonExistingPeer_data();
|
||||||
void writeToNonExistingPeer();
|
void writeToNonExistingPeer();
|
||||||
|
#if !defined(Q_OS_WINCE) && !defined(QT_NO_PROCESS)
|
||||||
void outOfProcessConnectedClientServerTest();
|
void outOfProcessConnectedClientServerTest();
|
||||||
void outOfProcessUnconnectedClientServerTest();
|
void outOfProcessUnconnectedClientServerTest();
|
||||||
|
#endif
|
||||||
void zeroLengthDatagram();
|
void zeroLengthDatagram();
|
||||||
void multicastTtlOption_data();
|
void multicastTtlOption_data();
|
||||||
void multicastTtlOption();
|
void multicastTtlOption();
|
||||||
@ -236,6 +240,7 @@ void tst_QUdpSocket::unconnectedServerAndClientTest()
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef Q_OS_AIX
|
||||||
void tst_QUdpSocket::broadcasting()
|
void tst_QUdpSocket::broadcasting()
|
||||||
{
|
{
|
||||||
QFETCH_GLOBAL(bool, setProxy);
|
QFETCH_GLOBAL(bool, setProxy);
|
||||||
@ -245,9 +250,6 @@ void tst_QUdpSocket::broadcasting()
|
|||||||
QSKIP("With socks5 Broadcast is not supported.", SkipSingle);
|
QSKIP("With socks5 Broadcast is not supported.", SkipSingle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef Q_OS_AIX
|
|
||||||
QSKIP("Broadcast does not work on darko", SkipAll);
|
|
||||||
#endif
|
|
||||||
const char *message[] = {"Yo mista", "", "Yo", "Wassap"};
|
const char *message[] = {"Yo mista", "", "Yo", "Wassap"};
|
||||||
|
|
||||||
QList<QHostAddress> broadcastAddresses;
|
QList<QHostAddress> broadcastAddresses;
|
||||||
@ -308,6 +310,7 @@ void tst_QUdpSocket::broadcasting()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -790,15 +793,10 @@ void tst_QUdpSocket::writeToNonExistingPeer()
|
|||||||
QCOMPARE(int(sConnected.state()), int(QUdpSocket::ConnectedState));
|
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)
|
||||||
void tst_QUdpSocket::outOfProcessConnectedClientServerTest()
|
void tst_QUdpSocket::outOfProcessConnectedClientServerTest()
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_WINCE)
|
|
||||||
QSKIP("This test depends on reading data from QProcess (not supported on Qt/WinCE).", SkipAll);
|
|
||||||
#endif
|
|
||||||
#if defined(QT_NO_PROCESS)
|
|
||||||
QSKIP("Qt was compiled with QT_NO_PROCESS", SkipAll);
|
|
||||||
#else
|
|
||||||
|
|
||||||
QProcess serverProcess;
|
QProcess serverProcess;
|
||||||
serverProcess.start(QLatin1String("clientserver/clientserver server 1 1"),
|
serverProcess.start(QLatin1String("clientserver/clientserver server 1 1"),
|
||||||
QIODevice::ReadWrite | QIODevice::Text);
|
QIODevice::ReadWrite | QIODevice::Text);
|
||||||
@ -852,18 +850,13 @@ void tst_QUdpSocket::outOfProcessConnectedClientServerTest()
|
|||||||
QVERIFY(clientProcess.waitForFinished());
|
QVERIFY(clientProcess.waitForFinished());
|
||||||
serverProcess.kill();
|
serverProcess.kill();
|
||||||
QVERIFY(serverProcess.waitForFinished());
|
QVERIFY(serverProcess.waitForFinished());
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// This test depends on reading data from QProcess (not supported on Qt/WinCE).
|
||||||
|
#if !defined(Q_OS_WINCE) && !defined(QT_NO_PROCESS)
|
||||||
void tst_QUdpSocket::outOfProcessUnconnectedClientServerTest()
|
void tst_QUdpSocket::outOfProcessUnconnectedClientServerTest()
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_WINCE)
|
|
||||||
QSKIP("This test depends on reading data from QProcess (not supported on Qt/WinCE).", SkipAll);
|
|
||||||
#endif
|
|
||||||
#if defined(QT_NO_PROCESS)
|
|
||||||
QSKIP("Qt was compiled with QT_NO_PROCESS", SkipAll);
|
|
||||||
#else
|
|
||||||
|
|
||||||
QProcess serverProcess;
|
QProcess serverProcess;
|
||||||
serverProcess.start(QLatin1String("clientserver/clientserver server 1 1"),
|
serverProcess.start(QLatin1String("clientserver/clientserver server 1 1"),
|
||||||
QIODevice::ReadWrite | QIODevice::Text);
|
QIODevice::ReadWrite | QIODevice::Text);
|
||||||
@ -918,8 +911,8 @@ void tst_QUdpSocket::outOfProcessUnconnectedClientServerTest()
|
|||||||
QVERIFY(clientProcess.waitForFinished());
|
QVERIFY(clientProcess.waitForFinished());
|
||||||
serverProcess.kill();
|
serverProcess.kill();
|
||||||
QVERIFY(serverProcess.waitForFinished());
|
QVERIFY(serverProcess.waitForFinished());
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void tst_QUdpSocket::zeroLengthDatagram()
|
void tst_QUdpSocket::zeroLengthDatagram()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user