diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-10-04 10:32:49 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-04 06:01:38 +0200 |
commit | 9d2ff58f3642828e494e7e9b2df7dbb8e2cd408f (patch) | |
tree | b2d385cd55c0dbfb6d7e1644907e71474ad76d3b /tests/auto/network/socket/platformsocketengine | |
parent | fe90725ced04351a11f54caff8636e4665fed396 (diff) |
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>
Diffstat (limited to 'tests/auto/network/socket/platformsocketengine')
-rw-r--r-- | tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp index b362e6b08c..1b74d2ec55 100644 --- a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp +++ b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp @@ -85,7 +85,9 @@ private slots: void simpleConnectToIMAP(); void udpLoopbackTest(); void udpIPv6LoopbackTest(); +#ifndef Q_OS_AIX void broadcastTest(); +#endif void serverTest(); void udpLoopbackPerformance(); void tcpLoopbackPerformance(); @@ -95,7 +97,9 @@ private slots: void setSocketDescriptor(); void invalidSend(); void receiveUrgentData(); +#ifndef Q_OS_WIN void tooManySockets(); +#endif }; tst_PlatformSocketEngine::tst_PlatformSocketEngine() @@ -296,11 +300,10 @@ void tst_PlatformSocketEngine::udpIPv6LoopbackTest() } //--------------------------------------------------------------------------- + +#ifndef Q_OS_AIX void tst_PlatformSocketEngine::broadcastTest() { -#ifdef Q_OS_AIX - QSKIP("Broadcast does not work on darko", SkipAll); -#endif PLATFORMSOCKETENGINE broadcastSocket; // Initialize a regular Udp socket @@ -335,8 +338,8 @@ void tst_PlatformSocketEngine::broadcastTest() QVERIFY(broadcastSocket.readDatagram(response.data(), response.size()) == response.size()); QCOMPARE(response, trollMessage); - } +#endif //--------------------------------------------------------------------------- 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() { -#if defined Q_OS_WIN - QSKIP("Certain windows machines suffocate and spend too much time in this test.", SkipAll); -#endif QList<PLATFORMSOCKETENGINE *> sockets; PLATFORMSOCKETENGINE *socketLayer = 0; for (;;) { @@ -548,6 +551,7 @@ void tst_PlatformSocketEngine::tooManySockets() qDeleteAll(sockets); } +#endif //--------------------------------------------------------------------------- void tst_PlatformSocketEngine::bind() |