summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-10-02 10:17:38 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-10-02 10:17:38 (GMT)
commitc6eb19412f1d0ffc1d5be1c7451e779c0286e013 (patch)
tree87f1e7e3a47049f1154401f709864d3070a22951 /tests
parentad90350d0ba3971591554f871ec17544be414038 (diff)
downloadQt-c6eb19412f1d0ffc1d5be1c7451e779c0286e013.zip
Qt-c6eb19412f1d0ffc1d5be1c7451e779c0286e013.tar.gz
Qt-c6eb19412f1d0ffc1d5be1c7451e779c0286e013.tar.bz2
Disabled QtNetworkSettingsInitializerCode code for Symbian HW.
This code is just causing more problems, than helping us to solve autotest problems. So initial purpose of this code is against us, why: qWarning used in this code sto print debug info is not visible in HW since global static objects are initialized before the QTestLib initializes the output channel. Running hostname resolving in globab static object constructir is not very trivial, requiring IAP setup and all network related code to be executed. Since application environment is no yet completely running at the time when gloabl static are costructed, the operation is deemed to fail. Failing means calling qFatal whcih in essence is causing panic in very early phase of test execution. This happens also for some QtCore autotests which have minor dependency to QtNetwork. making the autotest result to look worse than they actually are. Reviewed-by: Aleksandar Sasha Babic
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network-settings.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h
index 059d7b8..cd48360 100644
--- a/tests/auto/network-settings.h
+++ b/tests/auto/network-settings.h
@@ -334,31 +334,39 @@ QByteArray QtNetworkSettings::imapExpectedReplySsl;
class QtNetworkSettingsInitializerCode {
public:
QtNetworkSettingsInitializerCode() {
-#ifdef Q_OS_SYMBIAN
- // We have a non-trivial constructor in global static.
+#ifdef Q_OS_SYMBIAN
+#ifdef Q_CC_NOKIAX86
+ // We have a non-trivial constructor in global static.
// The QtNetworkSettings::serverName() uses native API which assumes
// Cleanup-stack to exist. That's why we create it here and install
// top level TRAP harness.
CTrapCleanup *cleanupStack = q_check_ptr(CTrapCleanup::New());
- TRAPD(err,
+ TRAPD(err,
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");
- }
- )
+ }
+ )
delete cleanupStack;
-#else
+//#else
+ // In Symbian HW there is no sense to run this check since global statics are
+ // initialized before QTestLib initializes the output channel for QWarnigns.
+ // So if there is problem network setup, also all QtCore etc tests whcih have
+ // QtNetwork dependency will crash with panic "0 - Exiciting"
+#endif
+
+#else
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");
- }
-#endif
+ }
+#endif
}
};
QtNetworkSettingsInitializerCode qtNetworkSettingsInitializer;