From a8fd0c3654f8352773638633778cd8003680cbc7 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 15 Nov 2011 11:36:18 +1000 Subject: Don't depend on moc to disable test functions. The moc tool is not aware of all defines (particularly those that are compiler builtins) and does not correctly evaluate others that depend on compiler builtins, such as Q_OS_FOO. This commit reverts parts of the following commits, but is not a complete fix as there were many instances of this problem in the tests prior to those commits: 924d810dbdcd5b5b0fa860922b2487ea9062d002 8aaff6751038b88d17e23be6fcee945771297c5b 338d3f11973412047c2c9cd41cbd0c961d738ef3 a55034062ba2bf73a9f1ed3d9cf31745b38149e3 253497b7446c7d723aa3bdd7152e25d6852f2604 7cfad460c56319ba89c4a3a0bbcb2e54ab1cdbc6 9d2ff58f3642828e494e7e9b2df7dbb8e2cd408f 0cf6baa2d61ebaad2a2a0530c37f27e719b68f4b Change-Id: I947d797fe3ec76139ba1b55561cea569895662c5 Reviewed-by: Rohan McGovern --- .../network/socket/qudpsocket/tst_qudpsocket.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp') 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 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); -- cgit v1.2.3