summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/network/kernel')
-rw-r--r--tests/auto/network/kernel/CMakeLists.txt19
-rw-r--r--tests/auto/network/kernel/qauthenticator/CMakeLists.txt21
-rw-r--r--tests/auto/network/kernel/qdnslookup/CMakeLists.txt12
-rw-r--r--tests/auto/network/kernel/qdnslookup_appless/CMakeLists.txt12
-rw-r--r--tests/auto/network/kernel/qhostaddress/CMakeLists.txt20
-rw-r--r--tests/auto/network/kernel/qhostinfo/CMakeLists.txt31
-rw-r--r--tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp22
-rw-r--r--tests/auto/network/kernel/qnetworkaddressentry/CMakeLists.txt12
-rw-r--r--tests/auto/network/kernel/qnetworkdatagram/CMakeLists.txt12
-rw-r--r--tests/auto/network/kernel/qnetworkinterface/CMakeLists.txt15
-rw-r--r--tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp33
-rw-r--r--tests/auto/network/kernel/qnetworkproxy/CMakeLists.txt12
-rw-r--r--tests/auto/network/kernel/qnetworkproxyfactory/CMakeLists.txt12
13 files changed, 178 insertions, 55 deletions
diff --git a/tests/auto/network/kernel/CMakeLists.txt b/tests/auto/network/kernel/CMakeLists.txt
new file mode 100644
index 0000000000..6ce3fcdf32
--- /dev/null
+++ b/tests/auto/network/kernel/CMakeLists.txt
@@ -0,0 +1,19 @@
+add_subdirectory(qdnslookup)
+add_subdirectory(qdnslookup_appless)
+add_subdirectory(qnetworkinterface)
+add_subdirectory(qnetworkdatagram)
+add_subdirectory(qnetworkaddressentry)
+add_subdirectory(qhostaddress)
+
+if(NOT WINRT)
+ add_subdirectory(qnetworkproxy)
+ add_subdirectory(qnetworkproxyfactory)
+endif()
+
+if(QT_FEATURE_private_tests)
+ add_subdirectory(qauthenticator)
+
+ if(NOT MACOS)
+ add_subdirectory(qhostinfo)
+ endif()
+endif()
diff --git a/tests/auto/network/kernel/qauthenticator/CMakeLists.txt b/tests/auto/network/kernel/qauthenticator/CMakeLists.txt
new file mode 100644
index 0000000000..f461591884
--- /dev/null
+++ b/tests/auto/network/kernel/qauthenticator/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qauthenticator.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qauthenticator Test:
+#####################################################################
+
+add_qt_test(tst_qauthenticator
+ SOURCES
+ tst_qauthenticator.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ PUBLIC_LIBRARIES
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qauthenticator.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
diff --git a/tests/auto/network/kernel/qdnslookup/CMakeLists.txt b/tests/auto/network/kernel/qdnslookup/CMakeLists.txt
new file mode 100644
index 0000000000..896b4431d8
--- /dev/null
+++ b/tests/auto/network/kernel/qdnslookup/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdnslookup.pro.
+
+#####################################################################
+## tst_qdnslookup Test:
+#####################################################################
+
+add_qt_test(tst_qdnslookup
+ SOURCES
+ tst_qdnslookup.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/kernel/qdnslookup_appless/CMakeLists.txt b/tests/auto/network/kernel/qdnslookup_appless/CMakeLists.txt
new file mode 100644
index 0000000000..847e1a6d90
--- /dev/null
+++ b/tests/auto/network/kernel/qdnslookup_appless/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdnslookup_appless.pro.
+
+#####################################################################
+## tst_qdnslookup_appless Test:
+#####################################################################
+
+add_qt_test(tst_qdnslookup_appless
+ SOURCES
+ tst_qdnslookup_appless.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/kernel/qhostaddress/CMakeLists.txt b/tests/auto/network/kernel/qhostaddress/CMakeLists.txt
new file mode 100644
index 0000000000..f967625d38
--- /dev/null
+++ b/tests/auto/network/kernel/qhostaddress/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qhostaddress.pro.
+
+#####################################################################
+## tst_qhostaddress Test:
+#####################################################################
+
+add_qt_test(tst_qhostaddress
+ SOURCES
+ tst_qhostaddress.cpp
+ PUBLIC_LIBRARIES
+ Qt::NetworkPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qhostaddress CONDITION WIN32
+ PUBLIC_LIBRARIES
+ ws2_32
+)
diff --git a/tests/auto/network/kernel/qhostinfo/CMakeLists.txt b/tests/auto/network/kernel/qhostinfo/CMakeLists.txt
new file mode 100644
index 0000000000..19eae0611d
--- /dev/null
+++ b/tests/auto/network/kernel/qhostinfo/CMakeLists.txt
@@ -0,0 +1,31 @@
+# Generated from qhostinfo.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qhostinfo Test:
+#####################################################################
+
+add_qt_test(tst_qhostinfo
+ SOURCES
+ tst_qhostinfo.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qhostinfo.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qhostinfo CONDITION WIN32
+ PUBLIC_LIBRARIES
+ ws2_32
+)
+
+#### Keys ignored in scope 3:.:.:qhostinfo.pro:WINRT:
+# WINRT_MANIFEST.capabilities = "internetClientServer"
diff --git a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
index a603b2d879..c4364aeb4e 100644
--- a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
+++ b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
@@ -47,12 +47,6 @@
#include <private/qthread_p.h>
#include <QTcpServer>
-#ifndef QT_NO_BEARERMANAGEMENT
-#include <QtNetwork/qnetworkconfigmanager.h>
-#include <QtNetwork/qnetworkconfiguration.h>
-#include <QtNetwork/qnetworksession.h>
-#endif
-
#include <time.h>
#if defined(Q_OS_WIN)
#include <windows.h>
@@ -121,11 +115,6 @@ private:
bool lookupDone;
int lookupsDoneCounter;
QHostInfo lookupResults;
-#ifndef QT_NO_BEARERMANAGEMENT
- QNetworkConfigurationManager *netConfMan;
- QNetworkConfiguration networkConfiguration;
- QScopedPointer<QNetworkSession> networkSession;
-#endif
};
void tst_QHostInfo::swapFunction()
@@ -180,17 +169,6 @@ void tst_QHostInfo::staticInformation()
void tst_QHostInfo::initTestCase()
{
-#ifndef QT_NO_BEARERMANAGEMENT
- //start the default network
- netConfMan = new QNetworkConfigurationManager(this);
- networkConfiguration = netConfMan->defaultConfiguration();
- networkSession.reset(new QNetworkSession(networkConfiguration));
- if (!networkSession->isOpen()) {
- networkSession->open();
- networkSession->waitForOpened(30000);
- }
-#endif
-
ipv6Available = false;
ipv6LookupsAvailable = false;
diff --git a/tests/auto/network/kernel/qnetworkaddressentry/CMakeLists.txt b/tests/auto/network/kernel/qnetworkaddressentry/CMakeLists.txt
new file mode 100644
index 0000000000..5a72d4e4a5
--- /dev/null
+++ b/tests/auto/network/kernel/qnetworkaddressentry/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qnetworkaddressentry.pro.
+
+#####################################################################
+## tst_qnetworkaddressentry Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkaddressentry
+ SOURCES
+ tst_qnetworkaddressentry.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/kernel/qnetworkdatagram/CMakeLists.txt b/tests/auto/network/kernel/qnetworkdatagram/CMakeLists.txt
new file mode 100644
index 0000000000..ae24d32917
--- /dev/null
+++ b/tests/auto/network/kernel/qnetworkdatagram/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qnetworkdatagram.pro.
+
+#####################################################################
+## tst_qnetworkdatagram Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkdatagram
+ SOURCES
+ tst_qnetworkdatagram.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/kernel/qnetworkinterface/CMakeLists.txt b/tests/auto/network/kernel/qnetworkinterface/CMakeLists.txt
new file mode 100644
index 0000000000..f23a17f077
--- /dev/null
+++ b/tests/auto/network/kernel/qnetworkinterface/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qnetworkinterface.pro.
+
+#####################################################################
+## tst_qnetworkinterface Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkinterface
+ SOURCES
+ ../../../../shared/emulationdetector.h
+ tst_qnetworkinterface.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../shared
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp b/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp
index bc6e5435df..47dd80a1c2 100644
--- a/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp
+++ b/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp
@@ -33,10 +33,6 @@
#include <qcoreapplication.h>
#include <qnetworkinterface.h>
#include <qudpsocket.h>
-#ifndef QT_NO_BEARERMANAGEMENT
-#include <QNetworkConfigurationManager>
-#include <QNetworkSession>
-#endif
#include "../../../network-settings.h"
#include "emulationdetector.h"
@@ -54,7 +50,6 @@ public:
private slots:
void initTestCase();
- void cleanupTestCase();
void dump();
void consistencyCheck();
void loopbackIPv4();
@@ -64,13 +59,6 @@ private slots:
void interfaceFromXXX_data();
void interfaceFromXXX();
void copyInvalidInterface();
-
-private:
-#ifndef QT_NO_BEARERMANAGEMENT
- QNetworkConfigurationManager *netConfMan;
- QNetworkConfiguration networkConfiguration;
- QScopedPointer<QNetworkSession> networkSession;
-#endif
};
tst_QNetworkInterface::tst_QNetworkInterface()
@@ -92,27 +80,6 @@ void tst_QNetworkInterface::initTestCase()
{
if (!QtNetworkSettings::verifyTestNetworkSettings())
QSKIP("No network test server available");
-#ifndef QT_NO_BEARERMANAGEMENT
- netConfMan = new QNetworkConfigurationManager(this);
- if (netConfMan->capabilities()
- & QNetworkConfigurationManager::NetworkSessionRequired) {
- networkConfiguration = netConfMan->defaultConfiguration();
- networkSession.reset(new QNetworkSession(networkConfiguration));
- if (!networkSession->isOpen()) {
- networkSession->open();
- QVERIFY(networkSession->waitForOpened(30000));
- }
- }
-#endif
-}
-
-void tst_QNetworkInterface::cleanupTestCase()
-{
-#ifndef QT_NO_BEARERMANAGEMENT
- if (networkSession && networkSession->isOpen()) {
- networkSession->close();
- }
-#endif
}
void tst_QNetworkInterface::dump()
diff --git a/tests/auto/network/kernel/qnetworkproxy/CMakeLists.txt b/tests/auto/network/kernel/qnetworkproxy/CMakeLists.txt
new file mode 100644
index 0000000000..e0cbe133af
--- /dev/null
+++ b/tests/auto/network/kernel/qnetworkproxy/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qnetworkproxy.pro.
+
+#####################################################################
+## tst_qnetworkproxy Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkproxy
+ SOURCES
+ tst_qnetworkproxy.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/kernel/qnetworkproxyfactory/CMakeLists.txt b/tests/auto/network/kernel/qnetworkproxyfactory/CMakeLists.txt
new file mode 100644
index 0000000000..ecacd338ab
--- /dev/null
+++ b/tests/auto/network/kernel/qnetworkproxyfactory/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qnetworkproxyfactory.pro.
+
+#####################################################################
+## tst_qnetworkproxyfactory Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkproxyfactory
+ SOURCES
+ tst_qnetworkproxyfactory.cpp
+ PUBLIC_LIBRARIES
+ Qt::NetworkPrivate
+)