summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/network-settings.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h
index 4804744..e114dd6 100644
--- a/tests/auto/network-settings.h
+++ b/tests/auto/network-settings.h
@@ -73,3 +73,17 @@ public:
#endif
};
+
+class QtNetworkSettingsInitializerCode {
+public:
+ QtNetworkSettingsInitializerCode() {
+ QHostInfo testServerResult = QHostInfo::fromName(QtNetworkSettings::serverName());
+ if (testServerResult.error() != QHostInfo::NoError) {
+ qWarning() << "Could not lookup" << QtNetworkSettings::serverName();
+ qWarning() << "Please configure the test environment!";
+ qWarning() << "See /etc/hosts or network-settings.h";
+ qFatal("Exiting");
+ }
+ }
+};
+QtNetworkSettingsInitializerCode qtNetworkSettingsInitializer;