summaryrefslogtreecommitdiffstats
path: root/src/testlib
Commit message (Collapse)AuthorAgeFilesLines
* Distinguish between Objective-C and Objective-C++ sourcesTor Arne Vestbø2015-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of lumping both Objective-C (.m) and Objective-C++ (.mm) sources into the same pile, passing them on to the same compiler as for C++ (CXX), with the C++ flags (CXXFLAGS), we follow Apple's lead and treat them as variants of the C and C++ languages separately, so that Objective-C sources are built with CC and with CFLAGS, and Objective-C++ sources with CXX, and CXXFLAGS. This lets us remove a lot of duplicated flags and definitions from the QMAKE_OBJECTIVE_CFLAGS variable, which in 99% of the cases just matched the C++ equivalent. The remaining Objective-C/C++ flags are added to CFLAGS/CXXFLAGS, as the compiler will just ignore them when running in C/C++ mode. This matches Xcode, which also doesn't have a separate build setting for Objective-C/C++ flags. The Makefile qmake generator has been rewritten to support Objective-C/C++ fully, by not assuming that we're just iterating over the C and C++ extensions when dealing with compilation rules, precompiled headers, etc. There's some duplicated logic in this code, as inherent by qmake's already duplicated code paths, but this can be cleaned up when C++11 support is mandatory and we can use lambda functions. Task-number: QTBUG-36575 Change-Id: I4f06576d5f49e939333a2e03d965da54119e5e31 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Move shortcut handling back into QPA and simplify deliveryTor Arne Vestbø2015-10-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 7f5b94b47 moved shortcut handling into QGuiApplication (for all platforms except OS X), due to crashes on Android where the events are delivered from another thread. Now that we have synchronous event delivery (also across threads) from QPA, this is no longer needed, and we can move the code back to QPA, where the platform has more control over when and how shortcut events are delivered in relation to normal key events. Handling shortcuts is as before a two step process. We first send a QKeyEvent::ShortcutOverride event to the active window, which allows clients (widgets e.g.) to signal that they want to handle the shortcut themselves. If the override event is accepted, we treat it as the shortcut not being handled as a regular shortcut, and send the event as a key press instead, allowing the widget to handle the shortcut. If nothing accepted the shortcut override event we pass it along to the global shortcut map, which will treat the event as handled if an exact or partial match is found. The QShortcutMap::tryShortcutEvent() and nextState() implementation has been simplified to not use the events accepted state for its internal operation, which removes the need for saving the state of the incoming event. The QKeyEvent::ShortcutOverride event was also always sent with the accepted state set to false, by calling ignore() on it before sending it. This is now explicit by having shortcut override events being ignored by default in their constructor, and the documentation has been updated accordingly. Change-Id: I9afa29dbc00bef09fd22ee6bf09661b06340d715 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* QTestLib: Add MSVC 2015 to blacklist.Friedemann Kleint2015-09-291-1/+3
| | | | | | Task-number: QTBUG-48455 Change-Id: I8ea322f393a1f8d44183892f20e5461d571bc4c0 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Replace direct QPA access in tst_qguiappliction with testlib wrapperTor Arne Vestbø2015-09-151-1/+7
| | | | | Change-Id: I698aa9d7633992d257296759f5e04307ff0d8331 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add a delimiter before "TracerPid"Thiago Macieira2015-09-131-1/+1
| | | | | | | | Future-proofing against a future version of the Linux kernel adding a "FooTracerPid:" before the TracerPid entry. Change-Id: I42e7ef1a481840699a8dffff140347457902900f Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix some qdoc warnings.Friedemann Kleint2015-09-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/corelib/io/qdebug.cpp:698: warning: Class QDebugStateSaver has no \inmodule command; using project name by default: QtCore qtbase/src/gui/opengl/qopenglframebufferobject.cpp:1138: warning: Can't link to 'takeTextures()' qtbase/src/gui/opengl/qopenglframebufferobject.cpp:1159: warning: Can't link to 'takeTextures()' qtbase/src/gui/opengl/qopenglframebufferobject.cpp:953: warning: No such parameter 'height' in QOpenGLFramebufferObject::addColorAttachment() qtbase/src/gui/opengl/qopenglframebufferobject.cpp:953: warning: No such parameter 'width' in QOpenGLFramebufferObject::addColorAttachment() qtbase/src/gui/opengl/qopenglframebufferobject.cpp:953: warning: Undocumented parameter 'size' in QOpenGLFramebufferObject::addColorAttachment() qtbase/src/gui/painting/qpaintdevice.qdoc:80: warning: Undocumented enum item 'PdmDevicePixelRatioScaled' in QPaintDevice::PaintDeviceMetric qtbase/src/testlib/qbenchmarkmetric.cpp:154: warning: Invalid use of '\relates' (already a member of 'QTest') qtbase/src/testlib/qbenchmarkmetric.cpp:81: warning: Invalid use of '\relates' (already a member of 'QTest') qtbase/src/widgets/dialogs/qdialog.cpp:152: warning: Can't link to 'QCloseEvent::ignore()' qtbase/src/widgets/dialogs/qdialog.cpp:557: warning: Can't link to 'QApplication::quit()' qtbase/src/widgets/kernel/qwidget.cpp:8326: warning: Can't link to 'QCloseEvent::accept()' qtbase/src/widgets/kernel/qwidget.cpp:8326: warning: Can't link to 'QCloseEvent::ignore()' qtbase/src/widgets/kernel/qwidget.cpp:9300: warning: Can't link to 'QWheelEvent::accept()' qtbase/src/widgets/kernel/qwidget.cpp:9300: warning: Can't link to 'QWheelEvent::ignore()' qtbase/src/widgets/kernel/qwidget.cpp:9321: warning: Can't link to 'QTabletEvent::accept()' qtbase/src/widgets/kernel/qwidget.cpp:9321: warning: Can't link to 'QTabletEvent::ignore()' qtbase/src/widgets/kernel/qwidget.cpp:9373: warning: Can't link to 'QKeyEvent::ignore()' Change-Id: I97ae85398181645c1054c303e5c8a87deb619409 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Testlib/Windows: Output crash information on stdout instead of stderr.Friedemann Kleint2015-09-031-9/+10
| | | | | | | | | | | | | | | Make it easier to capture information about crashing tests in log files, since it is not possible to do something like foo > log.txt 2> errlog.txt on Windows. Adapt selftest. [ChangeLog][QtTest][Important Behavior Changes] Crash/exception information is now logged to standard output on Windows. Task-number: QTBUG-47370 Change-Id: I3e6a2d25855ed0f20516418a031990b562f5f757 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix some qdoc-warnings.Friedemann Kleint2015-08-271-1/+1
| | | | | | | | | | | | | | | | | qtbase/src/widgets/kernel/qaction.cpp:1257: warning: Can't link to 'QApplication::setAttribute()' qtbase/src/widgets/kernel/qapplication.cpp:519: warning: Can't link to 'arguments()' qtbase/src/widgets/kernel/qapplication.cpp:1939: warning: Can't link to 'quit()' qtbase/src/widgets/kernel/qapplication.cpp:2946: warning: Can't link to 'quit()' qtbase/src/widgets/kernel/qapplication.cpp:2946: warning: Can't link to 'exit()' qtbase/src/widgets/kernel/qapplication.cpp:2946: warning: Can't link to 'processEvents()' qtbase/src/widgets/widgets/qmenu.cpp:1354: warning: Can't link to 'Recent Files Example' qtbase/examples/widgets/doc/src/tetrix.qdoc:28: warning: Can't link to 'QApplication::quit()' qtbase/src/testlib/qtestcase.cpp:268: warning: Undocumented parameter 'timeout' in QTRY_VERIFY2_WITH_TIMEOUT() qtbase/src/corelib/global/qnamespace.qdoc:2427: warning: Can't link to 'QApplication::setLayoutDirection()' qtbase/src/corelib/global/qnamespace.qdoc:751: warning: Can't link to 'QApplication::setDesktopSettingsAware()' Change-Id: Ic8170a40fb1cd84e3fb4dd75d9429f4b485f8bd9 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Disable the testlib watchdog if a debugger is presentSimon Hausmann2015-08-191-5/+41
| | | | | | | | | | Currently this is only implemented on Linux and Windows. But it's an improvement nevertheless when debugging Qt unit tests :) Change-Id: Iea307dad0e12c24f305c16f0a1805e7c246ee372 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QtTest: Add QHostAddress support for QCOMPARE failuresThiago Macieira2015-08-151-0/+20
| | | | | Change-Id: Iee8cbc07c4434ce9b560ffff13cc6dad04a5a554 Reviewed-by: Richard J. Moore <rich@kde.org>
* Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-061-2/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
| * QtTest: fix build error with -no-guiTasuku Suzuki2015-07-201-2/+9
| | | | | | | | | | Change-Id: I6f4297c7f959394ca31dfb228dac8659ea6c854d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QTestLib: Add macros QTRY_VERIFY2_WITH_TIMEOUT(), QTRY_VERIFY2().Friedemann Kleint2015-07-222-2/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add QTRY_VERIFY2_WITH_TIMEOUT() similar to QTRY_VERIFY_WITH_TIMEOUT() except that QTRY_VERIFY2() is used below the loop and QTRY_VERIFY2() based on it. Add tests to cmptest. [ChangeLog][QtTest] Added macros QTRY_VERIFY2_WITH_TIMEOUT(), QTRY_VERIFY2() making it possible to output a message after the timeout has expired. Change-Id: I587e24f3aeb73542dbf3ccb936a16f2e0806555f Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | QTestLib/Windows: Try to obtain a stack trace on crash.Friedemann Kleint2015-07-221-2/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a helper class for resolving debug symbols by dynamically loading dbghelp.dll and try to obtain a symbol at the exception location and a stack trace by using CaptureStackBackTrace(). The output looks like: A crash occurred in d:\dev\projects\crashingtest_5d\debug\tst_crashingtesttest.exe. Exception address: 0x0000000052E2853A Exception code : 0xc0000005 Nearby symbol : QString::length Stack: # 1: windowsFaultHandler() - 0x00007FFE080CACD0 ... # 8: QString::length() - 0x0000000052E28530 [ChangeLog][QtTest] A stack trace will be output on standard error if a test crashes. Task-number: QTBUG-47370 Change-Id: I7217e02ec7dc0c96132fe84d1a175d0bed9c5aaf Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Qt Test: Fix QCOMPARE message for signed and unsigned char.Vincas Dargis2015-07-212-0/+4
| | | | | | | | | | | | | | | | | | | | | | QCOMPARE did not print "Actual" and "Expected" values for quint8 and qint8 variables when they where not equal. QTest::toString<T>() lacked specializations for signed and unsigned char types, that are actually distinct types from char. Change-Id: Iae789885c474c56441da45065992d7ccf1bc9f5c Task-number: QTBUG-45238 Reviewed-by: Jason McDonald <macadder1@gmail.com>
* | Testlib: Remove overload qCompare(bool, int, ...).Friedemann Kleint2015-07-191-8/+0
| | | | | | | | | | | | | | | | | | | | | | It was added for NokiaX86 / RVCT compilers and may produce unexpected results with g++, where it matches for qCompare(int, enum). Task-number: QTBUG-47260 Change-Id: Ia29b9ae289c6df579a923aef6eb67e46db0b1120 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
* | qdoc:Fixed a few qdoc errorsMartin Smith2015-07-071-2/+2
| | | | | | | | | | | | | | | | | | Fixed a few qdoc error messages caused by errors in qmetatype.cpp and qtextlayout.cpp and qtestcase.cpp and qpointer.cpp Change-Id: I662aa25bedba057e125e289c34787e81793941ff Task-number: QTBUG-46939 Reviewed-by: Martin Smith <martin.smith@digia.com>
* | QtTestLib: Use Q_NULLPTR instead of 0 in all public headersMarc Mutz2015-07-0611-51/+59
| | | | | | | | | | | | | | | | | | | | | | | | This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Since QtTestLib has a lot of templates and macros, not all uses of 0 as nullptr might have been detected by the headersclean check. Task-number: QTBUG-45291 Change-Id: I21e9d8822e3a708010938e8d5ef2fd42ae6c8c68 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-07-014-19/+48
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qglobal.h src/corelib/global/qsysinfo.h src/corelib/global/qsystemdetection.h src/corelib/kernel/qobjectdefs.h src/plugins/plugins.pro tests/auto/widgets/itemviews/qlistview/qlistview.pro Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
| * Replace MAC OS X with OS XNico Vertriest2015-06-301-1/+1
| | | | | | | | | | | | Task-number: QTBUG-46374 Change-Id: I7bc633ab551740bd328a24b0ccae1d534af47138 Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Merge remote-tracking branch 'origin/5.5.0' into 5.5Liang Qi2015-06-272-17/+24
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafiledialoghelper.h Manually fixed src/testlib/qtestcase.cpp to return the right type. Change-Id: Id1634dbe3d73fefe9431b9f5378846cb187624e4
| | * testlib: fix compile error with macosx10.8Tim Blechmann2015-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [NSDate date] returns an id, so one needs to send a message instead of accessing a property. Backport commit 92b3397a from the 5.5 branch. Change-Id: Id70915e1ac23994a081765e0a527802fef61b573 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| | * QTest: Make qExtractTestData() return the created QTemporaryDirv5.5.0-rc1Marc Mutz2015-06-142-16/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and enable auto-deletion on it. This allows users of the function to get rid of their own cleanup code. They just need to keep the shared pointer alive for as long as they need it. Drive-by changes: - replaced QStringLiterals that were only used as the rhs of op+ - replaced an instance of mid() used as the rhs of op+ with midRef() - enabled NRVO Change-Id: I161d39461e020c9e8d473c0810dea2109fe0d62d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | QtTest: Increase the size of the alternate stackThiago Macieira2015-06-221-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default (8kB) isn't enough for modern Linux on x86-64. I can't exactly account for it, as the size of the xsave area is 0x340 bytes, plus the regular area it's still less than ~1.5 kB. But empirically we can see that 8kB causes a SIGSEGV when a signal is delivered, while 16 kB works. Since we're increasing the size, let's make sure it ends up in a separate page from the rest of the .bss data. Change-Id: I5d1e6f7607404caa96e4ffff13e84c87c33723c7 Reviewed-by: Jason McDonald <macadder1@gmail.com>
| * | Let QtTest use an alternate stack for its signal handlersThiago Macieira2015-06-151-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise, the handler can't be called for a stack overflow. Change-Id: I5d1e6f7607404caa96e4ffff13e7fabd66011785 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
| * | QTest::qExtractTestData(): Set permissions of extracted files.Friedemann Kleint2015-06-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the files are extracted with read-only permissions. If the data are extracted under a temporary directory, this prevents it from being deleted, causing a leak and test failures (for example, tst_qfileinfo). Change-Id: Idc85f31265af234446ed21d736e9a2b9866dc62d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | testlib: fix compile error with macosx10.8Tim Blechmann2015-06-041-1/+1
| |/ | | | | | | | | | | | | | | [NSDate date] returns an id, so one needs to send a message instead of accessing a property. Change-Id: I21ce9b64310315accb7a89278b292dd5c73adc4d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | QtTest: don't hold QBenchmarkResults in QListMarc Mutz2015-06-212-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | QBenchmarkResult is larger than a void*, so holding them in a QList is needlessly inefficient. Worse, the code could come to depend on the fragile property of (inefficient) QLists that references to elements therein never are invalidated. Also saves ~1.2KiB of text size on GCC 4.9 optimized C++11 AMD64 Linux builds. Change-Id: I0c99e591bb9b4405aa1bb78ec095dcaf9277993f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Improve back trace handlingSimon Hausmann2015-06-141-1/+1
| | | | | | | | | | | | | | | | Print the full backtrace including the values of all variables, for improved diagnostic analysis. Change-Id: Iffcaa08123599e3610cdc2e316627167bfff0f36 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Output registered enumeration names in QCOMPARE.Friedemann Kleint2015-06-121-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Produces output: FAIL! : tst_qquickwindow::cursor() Compared values are not the same Actual (clippedItem.cursor().shape()): ForbiddenCursor Expected (Qt::ArrowCursor) : ArrowCursor Loc: [tst_qquickwindow.cpp(1465)] Change-Id: I8a9dfa099a6011cbe0c07da683d4be3d07e22d5d Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | QTestLib: Add data parameter to SKIP message if anyCaroline Chao2015-06-101-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using GPU_BLACKLIST, a blacklisted test is volontary skipped early in the process to avoid crashes or undefined bahaviors. Thus the name of the running test only contains the slot name and doesn't show which data was eventually used. If a test is skipped while running with different data, the skip message currently doesn't tell which data was run either. To identify the skipped test, when the test is run with data, the data is now amended to the slot name in the skip message. Change-Id: I7acdc8951fa2c60d170cc77c0fbd842255746b35 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | QTestLib: Add data support to GPU_BLACKLISTCaroline Chao2015-06-101-4/+17
| | | | | | | | | | | | | | | | | | | | | | Follows the change 4fe68ffbe5c. Test cases run while using a given data can now also be skipped. The data follows the test function to skip in the features line: "features": [ "disable_functionToSkip:dataToSkip" ] Change-Id: I46445e3bed34d7d6507e7ccaaed4b83ab9b9a092 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Testlib: Export blacklist functionsCaroline Chao2015-06-081-3/+4
| | | | | | | | | | | | | | So they can be used in QtQuickTest. Change-Id: I64925feb243fb27234951276d81119bc1f6d5a56 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Keep the mouse timestamp for tests closer to the actual timeUlf Hermann2015-06-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass on the requested delay into the mouse events. We don't care about single msecs as the surrounding code also takes time that we don't consider and whenever we generate a release we add 500ms of time skew anyway. The initial press of a double click has to increment the timestamp, just like all other mouse events do. Change-Id: Ifb94830f9f878ce87d92bfd86c72a16b55052f3b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-037-4/+88
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qnamespace.qdoc src/corelib/io/qwindowspipereader.cpp src/corelib/io/qwindowspipereader_p.h src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/plugins/platforms/xcb/qxcbconnection.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/tools/qmake/tst_qmake.cpp tests/manual/touch/main.cpp Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
| * Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-06-011-0/+3
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/global/qglobal.h Change-Id: I2c0f7544bf194f2d0f59218fd583c822901487b0
| | * Doc: Added the missing \brief and \image for example docsVenugopal Shivashankar2015-05-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Qt TestLib examples are just tutorials so updated the qdocconf to use the default thumbnail in the Qt Creator welcome screen. Task-number: QTBUG-41996 Change-Id: Ia04a42a92e414c97a426b6095a62621a348e7de0 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
| * | Add GPU_BLACKLIST support to QTestLibLaszlo Agocs2015-05-084-3/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to BLACKLIST, Qt will now look for GPU_BLACKLIST too. Test cases that are specified as disabled in the GPU blacklist will be skipped. This is particularly relevant when running tests on Embedded Linux devices. For example, the following JSON would configure the test case glxContextWrap to be skipped on drivers where GL_VENDOR contains UnstableDriverVendor: { "entries": [ { "gl_vendor": "UnstableDriverVendor", "features": [ "disable_glxContextWrap" ] } ] } In contrast to the regular blacklist, GPU-blacklisted test cases are not run at all. This is because driver problems and instabilities often lead to crashes. Change-Id: I340cf5c0261a206109b78409774408981bba5c68 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | TestCase: Also check main source path when looking for test dataCaroline Chao2015-05-053-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is for example useful when looking for a possible BLACKLIST file while doing a shadow build. Add autotests for blacklist. Change-Id: I41d3939d31d21d10187fefcb82604736d911b6ad Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | Make data tables const.Volker Krause2015-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moves some of them to the .rodata section, the rest at least to .data.rel.ro[.local]. Change-Id: I85676ddf22b0c0097f3f0dce4c3dc018dc29d045 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | QTestLib: Move lastButton member into implementationUlf Hermann2015-06-023-11/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keeping a static variable in an inline function is a bad idea because each definition of that function will have its own version of the variable. As qtestmouse.h can be included multiple times in the same test (via some utility classes as with tst_qquickflickable), this leads to confusion. Change-Id: I80f198817c34c3a7e07bf6944189927817efb8a6 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Cleanup the mouse event handling in testlibLars Knoll2015-06-021-34/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling QCursor::setPos() to emulate mouse move events is a rather bad idea, as it creates round trips through the server, leading to timing issues etc. In addition, we should not call qapp->notify(), but rather route the events through the proper QPA interface. This is required to properly generate all other events such as enter/leave etc. As this breaks existing tests, put the new behavior behind an #ifdef for now. Like this, we can fix tests one by one, and then turn on the define by default for 5.6 (with a changelog message). We emulate timestamps to avoid creating double clicks by mistake. In addition, fix QGuiApplication::processMouseEvent to not push events back into the QPA event queue (as this is a bad hack and breaks the new testing system). Change-Id: I71774cb56674d7fb66b9a7cf1e1ada1629536408 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Add support for stack traces in testlib on MacSimon Hausmann2015-04-271-0/+11
| | | | | | | | | | | | | | | | | | | | | Use lldb to generate a stack trace. Change-Id: I30b0ab656dda66b6aaa05841df641bee004702f0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | Improve safety of QTestLib watchdogSimon Hausmann2015-04-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the side-effects of QThread start-up happening concurrently while test functions begin to execute by terminating the WatchDog constructor only when the thread itself is up and running. Change-Id: I21ee44206d789a7ecb5a220ee4729572548c0277 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | fix build with -warnings-are-errorsStephan Binner2015-04-221-1/+2
| | | | | | | | | | | | | | | Change-Id: Ic8929ed77f0f2fa8ca7a8d7a91cfbe48918c2043 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-223-3/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/gui/painting/qdrawhelper.cpp src/plugins/platforms/xcb/qxcbnativeinterface.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/plugins/platforms/xcb/qxcbwindow.h src/testlib/qtestblacklist.cpp src/tools/qdoc/node.cpp src/tools/qdoc/node.h tests/auto/gui/painting/qcolor/tst_qcolor.cpp Change-Id: I6c78b7b162001712d5774293f501b06b4ff32684
| * | Remove libs that are already set by the mkspec.Bjoern Breitmeyer2015-04-211-2/+1
| | | | | | | | | | | | | | | | | | Change-Id: I79c47e5a49ce048c634e4bc708b632e51133c027 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * | Implement a more direct headersclean checkThiago Macieira2015-04-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test each include file directly, instead of doing a large #include. This verifies that each header is compilable on its own. One big advantage of doing it via a special compiler in qmake is that we skip pre-compiled headers, which has hidden build errors in the past. This solution is implemented by making syncqt produce a second list of headers. This list is the same as the list of headers in the source code to be installed, minus the headers that declare themselves to be unclean, via the pragma: #pragma qt_sync_skip_header_check This mechanism is applied only for public libraries (skipping QtPlatformSupport, an internal_module). This test is enabled only for -developer-builds of Qt because it increases the compilation time. On QtTest: the library only links to QtCore, but it has two headers that provide inline-only functionality by including QtGui and QtWidgets headers (namely, qtest_gui.h and qtest_widget.h). If those two modules aren't getting compiled due to -no-gui or -no-widgets to configure, we need to remove the respective headers from the list of headers to be checked. If they are being built, then we need to make QtTest's build wait for the headers to be generated and that happens when qmake is first run inside the src/gui and src/widgets directories. Change-Id: I57d64bd697a92367c8464c073a42e4d142a9a15f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-151-1/+1
| |\| | | | | | | | | | Change-Id: I004854a25ebbf12b1fda88900162fe7878716c58
| | * Explicitly cast to a uint to fix a compile errorAndy Shaw2015-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using QtTest inside the notification example for QtAndroidExtras there as a problem with the compilation as it saw it as being an ambiguous check. Therefore doing an explicit case to uint ensures it is not a problem. Change-Id: Ibc9ce4c64292bf5ae7c501c592d8c42a66934b8b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>