diff options
-rw-r--r-- | tests/auto/network-settings.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h index 144f7b3..6ffb6f4 100644 --- a/tests/auto/network-settings.h +++ b/tests/auto/network-settings.h @@ -328,3 +328,18 @@ QByteArray QtNetworkSettings::imapExpectedReplySsl; #else #define Q_SET_DEFAULT_IAP #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; |