diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2022-03-30 17:33:07 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2022-04-01 23:03:58 +0200 |
commit | 50a5ef9945ae9c2ccb869a5b22f3a44460bdd3c6 (patch) | |
tree | b94aa41c218ba17e1a8d9ad2d6469eabe7737fde /tests/auto/corelib/io | |
parent | d063b2b131222db92f88714882c690a20041e0fb (diff) |
tst_QIODevice::unget() without network: skip only the affected part
Instead of QSKIPing the whole test, ignoring what was already tested
Change-Id: Iced928ce1bce92b447c8698a9942973cb78b6c15
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto/corelib/io')
-rw-r--r-- | tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp index f6c230714a..28e39c6369 100644 --- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp +++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp @@ -276,12 +276,15 @@ void tst_QIODevice::unget() lineResult = "ZXCV"; } else { #ifdef QT_TEST_SERVER - if (!QtNetworkSettings::verifyConnection(QtNetworkSettings::httpServerName(), 80)) - QSKIP("No network test server available"); + const bool hasNetworkServer = + QtNetworkSettings::verifyConnection(QtNetworkSettings::httpServerName(), 80); #else - if (!QtNetworkSettings::verifyTestNetworkSettings()) - QSKIP("No network test server available"); + const bool hasNetworkServer = QtNetworkSettings::verifyTestNetworkSettings(); #endif + if (!hasNetworkServer) { + qInfo("No network test server: skipping QTcpSocket part of test."); + continue; + } socket.connectToHost(QtNetworkSettings::httpServerName(), 80); socket.write("GET / HTTP/1.0\r\n\r\n"); QVERIFY(socket.waitForReadyRead()); |