Commit Graph

2148 Commits

Author SHA1 Message Date
Stephen Kelly
61c433785e Move the CMake unit tests to auto/
This will allow the CI system to run the tests. The tests are only
run if cmake is found.

Change-Id: Ie73a56114c151871160bafcbf0b90b2d54620855
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-04-23 17:03:56 +02:00
Jason McDonald
d7a102ac65 Start running some disabled tests again on Mac OS.
These tests were disabled when trying to get CI working on Mac OS
because they asserted or crashed.  Now that CI is working well on Mac
OS, start running these tests again, initially as insignificant tests.
CI results will then be used to determine whether the tests can be made
significant.

Change-Id: Ife411e6b8c84ade45c865ef35f3ae0071d6f8d2b
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-23 09:46:22 +02:00
Jason McDonald
ed9b52ecfb Re-enable QGraphicsView test on Windows, Mac and Ubuntu 11.10.
On Windows, the test had a stable failure and an XPASS related to an
already closed bug report.  On Mac, the test had one stable failure, on
the same statement that had the XPASS on Windows.  On Ubuntu, the test
has been passing consistently.

Mark the stable failures with QEXPECT_FAIL, remove the QEXPECT_FAIL that
causes the XPASS, and remove the insignificant_test markers to re-enable
the test.

Task-number: QTBUG-24296
Change-Id: I05dd16b39296919268fee216332929df591f2b66
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-23 09:45:24 +02:00
Kalle Viironen
83c637aa94 Fix bug in qsslsocket peek()
Calling peek() for qsslsocket caused socket data to be copied into
qiodevices buffer and therefore make it unaccessible in qsslsocket.

Cherry picked form 4.8-branch & modified to Qt5 API changes
(int -> qintptr)
Original commits:
commit 621f18955082fc73471e75d1f8c35c2dcd4befeb
Author: Shane Kearns <ext-shane.2.kearns@nokia.com>
commit 68b1d5c17aa38d5921bdade2b0e0cb67c6c90513
Author: Kalle Viironen <kalle.viironen@digia.com>

Task-number: QTBUG-18498
Change-Id: I6be4b19baec2f3197537f5e7b61432040ec84ad2
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-23 09:45:24 +02:00
Jason McDonald
d5f157c165 Fix XPASS in QGraphicsWidget test on Ubuntu 11.10.
This test was marked insignficiant on Ubuntu 11.10, but the only failure
was an XPASS.  Make the test significant again, and only include the
QEXPECT_FAIL for CI platforms where the test is known to fail, i.e.
Windows and Ubuntu 10.04.

Task-number: QTBUG-20778
Change-Id: I24af3dab45118758382ba03c8c7a310f16301f8c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-23 09:45:24 +02:00
Jason McDonald
9c21557dd6 Remove insignification from QGraphicsProxyWidget test on Windows.
This test has three stable failures on Windows.  Mark those failures
with QEXPECT_FAIL and re-enable the test.

Task-number: QTBUG-24294
Change-Id: I9eee2701a228912c3a91fa730e712661fb93add6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-23 09:45:24 +02:00
Jason McDonald
7ace6169fb Remove insignification from QCompleter autotest.
Until March 15, 2012, this test failed consistently on Mac and passed
on other platforms. Since then, the test has passed consistently on all
platforms.

Change-Id: Ie773643a1c9dc0ab3596786badbc3c3afd4824d6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-23 09:45:24 +02:00
Girish Ramakrishnan
8fb7efeb2f QTextLayout::d is private
Compile fix for tst_qtextscriptengine.cpp test on the mac.

Change-Id: I912a339c6c659dc8958cc5997a331e3c18c9cb06
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-23 07:30:02 +02:00
Thiago Macieira
c4a457f8e4 Replace com.trolltech with org.qtproject in D-Bus's performance tests
I had missed these, apparently.

Task-number: QTBUG-23274
Change-Id: I6455dc34b18ec9cefccfe527b3fd3ad34fb61aa3
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
2012-04-22 21:32:24 +02:00
Stephen Kelly
460bf5f051 Build the tests with the build type that the top-level was invoked with.
Change-Id: I87918276987b3a506c2ac8556940fce89a2d20cd
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-20 22:23:23 +02:00
Thiago Macieira
ad83a7ad6f Silence two warnings in QVariant's unit test.
These warnings are expected and correct, so ignore them.

Change-Id: I43931950e46bd3c931db869902574ee7219efa1d
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-20 22:23:23 +02:00
Thiago Macieira
369863efef Don't push unnecessary data to a data stream for QVariant()
Adjust the test because we don't read past the end anymore.

Task-number: QTBUG-25108
Change-Id: I8243f1d5ae79d1256aab2cb1132598a716a7eeeb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-20 22:23:23 +02:00
Shane Kearns
fffc900f78 Windows - "bypass proxy for local..." also affects IP addresses
If the "bypass proxy for local addresses" option is enabled in
the windows proxy configuration, then do not use the proxy for
any IP address in the subnet of any network interface.

As the systemProxyForQuery api is now offering HTTP proxy tunnels
for TCP sockets, this change avoids local ad-hoc network
connections being routed through the proxy.
In the case where the local address was on a different interface to
the proxy server, it may have been unreachable through the proxy.
For example IP over USB or Bluetooth.

Change-Id: I0842732832a7795112be029d923ed168edc008d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-20 22:23:23 +02:00
Stephen Kelly
57482b930f Make sure -fPIE is added to the compile flags.
Change-Id: I279881693b6eba15a2e145742b3281c9425e9b2e
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-20 19:59:43 +02:00
Stephen Kelly
2dff7ad9e8 Only run the CMake DBus unit tests on UNIX systems.
Change-Id: I0c5b511229a7ac0c2aa23a9c3d2053077e94936c
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-20 19:59:34 +02:00
Friedemann Kleint
9b7739899e Window geometry manual tests: Add Window state controls.
- Factor out controls from the window flags test, split state
  into Qt::WindowState (QWindow) and Qt::WindowStates(Qt::Widget).
- Add to geometry test.

Change-Id: I25b9a8696bfb7f4faef113ac82559ebb90a140c5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-20 16:21:17 +02:00
Thiago Macieira
e7da3a104c Disable the tst_exceptionsafety_others test completely.
QObject is no longer exception-safe and there's no one working on
improving this, so let's not block innocent commits because of this
failure.

QObjectPrivate's constructor initialises the
QObjectPrivate::threadData member to null, but the destructor
dereferences it unconditionally (the member is initialised in the
QObject constructor). That means QObjectPrivate is not exception-safe
by any definition and, so, anything depending on QObject is not
exception-safe.

Change-Id: If9d5004630b7ce2fb357e328627794caad67564f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-20 15:48:15 +02:00
Shane Kearns
7742b2c97c Stabilisation of tst_qnetworkreply on windows
Workaround QTBUG-24451 by retrying creation of SocketPair if it fails
(waitForConnected and waitForNewConnection are used in the factory
function).
Skip very unstable test cases due to QTBUG-25386

Change-Id: I32129922329b895eb3719d61719c487a4d52c466
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-20 12:46:47 +02:00
Morten Johan Sorvig
128b7c56b7 Implement QCocoaWindow::setWindowState.
Add window state change notification logic. Send
and expose event in addition to window state change
on window restore since the QWidget logic expects
this.

Modify QCocoaWindow::setVisible to sync up window
state that may have been set on the hidden window.

Refactor NSWindow event observing to use one observer
function for all notifications.

Add window state testing to tests/manual/windowflags
Add delay after showFullScreen in tst_qstatusbar to
wait for the Lion fullscreen transition.

Change-Id: I57c523cedd0644d4181b40d72046fad4fdb09a9c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-20 10:29:14 +02:00
Morten Johan Sorvig
872f567d53 Set the window title for the QWindow as well.
Change-Id: I2ff20307974c4b6a2a4fb09d09941d0a0dd09d0e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-20 10:29:14 +02:00
Jason McDonald
1a65fa711a Remove insignification from QComboBox test on Ubuntu 11.10.
This test has not failed in the last 400 CI runs.

Task-number: QTBUG-23639
Change-Id: I2a8e105ebcba3654a6aac4fd8207c8fbcd2c4db3
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-04-20 10:29:14 +02:00
Stephen Kelly
384eec86e5 Ensure that this widget has focus before sending a keypress.
This doesn't fix the bug, but confirms that it is CI flakyness.

Task-number: QTBUG-21098

Change-Id: Ic37a7574af88205371f4b2c24113d12b1386835c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-20 00:29:39 +02:00
Stephen Kelly
b780196a95 Add some more output to debug a flaky test.
Task-number: QTBUG-23638

Change-Id: Ib6a8634ede4b6461e41ce6843ac2654dcd1999f5
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-20 00:29:39 +02:00
Jason McDonald
5fc7490f95 Remove insignification from QMdiSubWindow test on Mac OS X.
This test has four stable failures. Mark those with QEXPECT_FAIL and
re-enable the test.

Task-number: QTBUG-25297
Change-Id: Ic5304443c4467c46f70ef033c8f17d7f3732294c
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-04-19 19:46:07 +02:00
Jason McDonald
7d422688c2 Remove insignification of qsocks5socketengine on Ubuntu 11.10
The test has one stable failure on CI, but that failure is not observed
by all Ubuntu 11.10 users. Mark that failure with QEXPECT_FAIL when it
is going to fail and re-enable the test, following the pattern
established for the qtcpsocket test on this platform.

Task-number: QTBUG-23380
Change-Id: Ic7546595f314c55ebd36957ada92978141a1c509
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-19 19:46:07 +02:00
Friedemann Kleint
7f533cdd4a Remove Q_WS macros from qwidget-test.
- Remove Q_WS-ifdefed sections and switch by platform name instead.
- Remove Q_OS_IRIX and Q_WS_QWS conditionals
- Fix deprecated QPixmap::grabWidget(), QPixmap::grabWindow()
  calls.
- Use QTest::qWaitForWindowShown() instead of
  qt_x11_wait_for_window_manager().
- Rewrite some platform-specific code using QPA interfaces.

Change-Id: I29ce4c4f3e5c05edddfd018dc2eabdd77738eb23
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-19 19:46:07 +02:00
Shane Kearns
a6156d1aed Add test case for checking ConnectInBackground is set
ConnectInBackground should be set when opening a network session
due to a background request. This test checks that.
Unfortunately, none of the bearer plugins currently in Qt Base support
this attribute, so the test result is inconclusive.
(testing with a debugger shows the attribute is set correctly, but
it can't be read back as the set is discarded by the plugin
implementation)

Change-Id: Idcf777fe489a62d4ff5007ffd291a84ba052311b
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-19 19:46:07 +02:00
Shane Kearns
af100dbd7e Abort background requests if policy changes to disallow them
Using the policy change signal from QNetworkSession.
If the new policy disallows background requests and this is a
background request, then generate an error.
This results in a TCP RST on the socket, and a
BackgroundRequestNotAllowedError on the QNetworkReply.

If the reply is already finished, no action is taken.

Change-Id: I4ff5c681a8b7b852727bb95f03664d666f4efe07
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-19 19:46:07 +02:00
Shane Kearns
ddf040eccb Expand tst_QNetworkReply::backgroundRequest to ftp & https
Ftp and Http have different implementations of QNetworkReply,
so test both of them.

Change-Id: If502fa1788110edf89e619966534eea08830a19b
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-19 19:46:07 +02:00
Friedemann Kleint
93b34badfe Add a manual test for the window geometry.
Test positioning QWindow and QWidget (frame / normal geometry)
for testing QPA plugins.
The test can be built with  Qt 4 for comparison.

Change-Id: I695bf28d5fdf738262d322518d01ad04aa5056f5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-19 19:46:07 +02:00
Jason McDonald
c1bfcb29ff Remove insignification from QMenuBar test on Ubuntu 11.10.
This test hasn't failed in the last 400 CI builds.

Task-number: QTBUG-4965
Change-Id: I2ff03b7a12906a2b583b3127bf47c12b901ed319
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-04-19 17:05:41 +02:00
Jason McDonald
2b130d0cf6 Remove insignification from QDoubleSpinBox test on Ubuntu 11.10.
This test has not failed during the last 400 CI builds.

Task-number: QTBUG-23641
Change-Id: Ibcb840679e023db41456e41eedcfcc38ecedbaac
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-04-19 16:25:55 +02:00
Jason McDonald
4de95586f1 Re-enable QGLThreads autotest on Mac OS X.
This test passes consistently on Mac OS, but crashes consistently on
Windows and fails consistently on Ubuntu 10.04 and 11.10.

Disable the test only on platforms where it known to fail, so that CI
can use it to detect future regressions on platforms where the test
currently passes.

Task-number: QTBUG-22560
Change-Id: I0def45e1ed7dd3387e42e7294a495c89bc0caea6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-19 13:26:51 +02:00
Jason McDonald
970f5e18fe Re-enable QGL autotest on Mac OS X and Ubuntu 11.10.
This test passes consistently on Mac OS and Ubuntu 11.10, but crashes
consistently on Windows and fails consistently on Ubuntu 10.04.

Disable the test only on platforms where it known to fail, so that CI
can use it to detect future regressions on platforms where the test
currently passes.

Task-number: QTBUG-25293
Change-Id: I5d6a474ea1e6fdf3983f164ebc181e1dd6e3f639
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-19 13:26:51 +02:00
Jason McDonald
fb0978e963 Remove insignification from QtConcurrentFilter test.
This test has one unstable failure that occurs about 0.8% of the time in
CI.  Make the test catch this particular failure and re-enable the rest
of the test.

Task-number: QTBUG-20688
Change-Id: I22f5d372db77ea35163f96195ac0c174d8078899
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-19 13:26:51 +02:00
Jason McDonald
a594e5cfc8 Remove insignification from QFocusEvent test on Mac OS X.
This test has one stable failure.  Mark that failure with QEXPECT_FAIL
and re-enable the test.

Task-number: QTBUG-22815
Change-Id: I38445b659235076b00d9dd82d2a824d1caa1439b
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-19 08:07:39 +02:00
Jason McDonald
25f3c16c94 Remove insignification from QAccessibility test on Mac OS X.
This test has one stable failure.  Mark that failure with QEXPECT_FAIL
and re-enable the test.

Task-number: QTBUG-22812
Change-Id: I1e1ad63472db7ba724c9936ae718de0b3b078bbd
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-19 08:07:30 +02:00
Jason McDonald
bb495823d6 Remove insignification from QClipboard test on Mac OS X.
This test hasn't failed for more than 250 CI runs, before which it was
failing consistently.

Change-Id: I0c2f7d3893731c800bebb0d3d51312d0d0948eb5
Reviewed-by: QTBUG-23057
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-19 08:07:22 +02:00
Jason McDonald
005441f742 Remove insignification of QStaticText test on Mac OS X.
This test has not failed in more than 300 CI runs, before which it was
failing consistently.

Change-Id: Ib9a0e4120b276e5620b544a0836134f1cbac7c84
Reviewed-by: QTBUG-23063
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-19 08:07:13 +02:00
Jason McDonald
b6cf486816 Re-enable QTextScriptEngine test.
The test has two stable failures. Mark these with QEXPECT_FAIL and
re-enable the test.

Task-number: QTBUG-23064
Change-Id: Ibb607ac252a6690d0d37f650a5ae41e5e2a681a2
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-19 08:07:03 +02:00
Jason McDonald
14ba6240bb Re-enable QFontDatabase test on Mac OS X.
This test has one stable failure on Mac.  Mark that failure with
QEXPECT_FAIL so that the rest of the test can be used by CI to catch
regressions.

Also, change the failing QVERIFY to QCOMPARE so that the mismatching
QStringList values will appear in the test output.

Task-number: QTBUG-23062
Change-Id: Icb0cccfe0bd5bc74a6a2c1ddba89c1f55f5e64de
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-19 08:06:52 +02:00
Jason McDonald
7f0c130be9 Re-enable QPrinterInfo test on Mac OS X.
This test has not failed in the last 1000 CI runs on Mac.  It only fails
when the test machine has some printers configured, which is not
presently true for the CI machines.

The two options are to disable the test on all unix platforms (because
it fails on all unicies when there are printers present) or to enable
the test for all platforms so that CI can catch regressions that don't
depend on having printers connected.  I choose the latter option.

If the CI machines are configured with printers before the known bug is
fixed, the failures should be marked with QEXPECT_FAIL rather than
disabling the whole test again.

Task-number: QTBUG-23060
Change-Id: I3cebed4aefdd088ff00215ea9d7413f90bd9e9b1
Reviewed-by: John Layt <jlayt@kde.org>
2012-04-19 04:13:04 +02:00
Jason McDonald
61c1c5a650 Re-enable the QItemDelegate test on Ubuntu 11.10.
This test used to be unstable, but has not failed for more than 400 CI
builds.

Task-number: QTBUG-23637
Change-Id: I0d92136aa9d641e447820ab19b53034f475f74da
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-04-19 04:13:04 +02:00
Rohan McGovern
1464081dfb Really marked tst_QProcess as insignificant on Windows.
This test hangs ~2.6% of the time in CI.

The previous commit which attempted to mark this test as insignificant
did not work due to this .pro file doing a load(testcase) prior to the
line which set CONFIG += insignificant_test.  testcase.prf must be
loaded _after_ insignificant_test is set.

Task-number: QTBUG-25342
Change-Id: I20470337fda8235e2fd0b6e8d5f564c8c57d167e
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2012-04-19 01:57:58 +02:00
Jędrzej Nowacki
b3e55fbf4e Do not assert when QVariant is constructed from an invalid type id
That change also fix moduleForType() which was wrongly recognizing
negative ids as belonging to Core.

New tests were added.

Change-Id: I40a5819effb32489a45937011980457387c9f8be
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-04-19 01:57:58 +02:00
Stephen Kelly
c12057df29 Fix a CMake unit test.
This has been broken since modules do not currently find
their (public) dependencies.

Change-Id: I0c9e7c46f7a6499993c98aa6d33996bdd3a1be5f
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-18 19:53:34 +02:00
Stephen Kelly
d5bd336dba Build the first CMake test if *at least* version 2.8.7 is available.
Change-Id: I061130e5b937ad818cc9016ae62d5890092d60f2
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-18 19:53:34 +02:00
Jason McDonald
d615e02bf1 Remove insignification of QNetworkInterface autotest on Windows.
This test has not failed in the last 300 CI runs.

Change-Id: I559ea223856b1460deb343384d5b4439f42a41d7
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-18 14:33:55 +02:00
Jason McDonald
e4f4dfe340 Remove insignification from the Lancelot test.
This test has not failed in the last 400 CI builds.

Change-Id: I22b59565a6a6cb48653bd9b0d967abbf074d59a4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-18 14:23:48 +02:00
Jason McDonald
fe4aa255a9 Update task numbers for QUdpSocket autotest.
Reference tasks with detailed analysis of failures rather than generic
task for blacklisted tests.

Change-Id: Ibd0ed836ffb84fe9aa14488d43085316e666de21
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-18 14:23:42 +02:00