qt5base-lts/tests/auto
Jason McDonald e15548d3e4 Fix sanity check of network test server
Some of Qt's autotests depend on access to a test server.  For each test
that used the test server, tests/auto/network-settings.h created a
global object to verify at startup that host lookups to the test server
will succeed (and abort the test otherwise).

There are two problems with that approach:

First, the sanity check happens before main(), and thus before the test
framework has started logging test results.  This means that if the
sanity check aborts the test, the failure message will not be visible in
the test output if logging to a file or will cause the output to be
malformed if logging to the console in XML format.

Second, since Qt 4.7, the host lookup uses a class that connects to the
QCoreApplication instance, which doesn't exist before main(), and this
caused all tests that included network-settings.h to output an error
message from QObject::connect() at the beginning of the test.

Both of these problems are solved by removing the global object from
network-settings.h and instead performing the sanity check in the
initTestCase() function of each test.

Task-number: QTBUG-22876
Change-Id: Id49c1826906327bf571686cc11527f0265e5af44
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-28 08:13:41 +01:00
..
bic
compilerwarnings/data Remove uilib and QtUiTools from QtBase 2011-09-13 20:11:40 +02:00
corelib Fix sanity check of network test server 2011-11-28 08:13:41 +01:00
dbus Fix stack overwrite in QDBusDemarshaller 2011-11-23 19:14:12 +01:00
gui Fixed regression in tst_qscreen. 2011-11-23 22:23:55 +01:00
guiapplauncher Update the documentation after moving examples. 2011-07-05 21:19:08 +02:00
integrationtests Fix sanity check of network test server 2011-11-28 08:13:41 +01:00
network Fix sanity check of network test server 2011-11-28 08:13:41 +01:00
opengl Moved tests into gui/kernel/ and gui/qopengl/ 2011-11-04 20:48:19 +01:00
other Don't depend on moc to disable test functions. 2011-11-18 01:51:57 +01:00
sql SQLite support only one statement at a time 2011-11-23 08:36:14 +01:00
testlib Make usage of internal QVariant space. 2011-11-09 10:11:34 +01:00
tools Add support to moc for registering non-local enums via Q_ENUMS. 2011-11-27 22:51:39 +01:00
v8 qtbase tests: Fix some warnings 2011-11-21 09:58:23 +01:00
widgets Correct usage of network-settings.h. 2011-11-28 08:13:41 +01:00
xml all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
auto.pro Re-enable the opengl autotests on Mac OS X 2011-11-21 14:24:36 +01:00
network-settings.h Fix sanity check of network test server 2011-11-28 08:13:41 +01:00
platformquirks.h Remove unused PlatformQuirks functions. 2011-11-05 02:31:07 +01:00
test.pl Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00