summaryrefslogtreecommitdiffstats
path: root/src/testlib
Commit message (Collapse)AuthorAgeFilesLines
* Remove doc for non-existent QTest::qCompare() variant.Edward Welbourne2016-01-061-4/+0
| | | | | | | There's no variant with bool first argument. Change-Id: Ib18b50ed6271d21253d075dc72b6e2b8744cf131 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Cleanup memory owned by QTestTablePrivateFrank Meerkoetter2015-12-301-0/+5
| | | | | | | | | | Since 7a42c8c15c59ef5fe84e6f293f2c97d38b85599c QTestTablePrivate no longer cleans up the memory it holds in dataList. This will make tools such as valgrind/address-sanitizer generate a lot of noise about directly or indirectly leaked memory. Change-Id: Ic0900ecdd7b76cda9f5366f3950bccde2f1b244c Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* QtBase: remove explicit function info from qWarning() etcMarc Mutz2015-11-281-5/+4
| | | | | | | | | | | This information is already registered by the QMessageLogger ctor. Where, by dropping the << Q_FUNC_INFO in ostream-style qDebug(), only a string literal remained, converted to printf-style qDebug() on the go. Change-Id: I3f261c98fd7bcfa1fead381a75a82713bb75e6f3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix QCOMPARE with enum classes.Robin Burchell2015-11-261-1/+1
| | | | | | | | | | | As these are strongly typed, they won't implicitly convert to int, so make sure to cast explicitly. (cherry picked from commit 9626baaea98edc13236250fc4b92d461b80e3875, auto test is not included) Task-number: QTBUG-49597 Change-Id: I29c4331a9b0c61f2e60c2bcab5a99f65daa7060f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QSignalSpy: Improve warning about unregistered parameter types.Friedemann Kleint2015-11-251-2/+5
| | | | | | | | | | | | Don't know how to handle 'hint', use qRegisterMetaType to register it. becomes: QSignalSpy: Unable to handle parameter 'hint' of type 'QAbstractItemModel::LayoutChangeHint' of method 'layoutChanged', use qRegisterMetaType to register it. Task-number: QTBUG-49623 Change-Id: I5020bb5b6f4ba87438d0f862279bed1ceb203d12 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QTest::mouseEvent expects window-local coordinates.Volker Krause2015-11-171-1/+1
| | | | | | | | This makes the automatic center click feature of the mouse event methods also work if the target window isn't positioned at 0,0. Change-Id: I0d711e484620900ba2ffc4139f7e13346a7482d3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Testlib: Replace linked lists in QTestTablePrivate by std::vector.Friedemann Kleint2015-11-061-122/+39
| | | | | | | | | | This speeds up tests/auto/corelib/tools/qchar which spends a lot of time in QTestTablePrivate::elementAt(), QTestTablePrivate::dataAt() from 6s to 500ms on an average Linux machine. Task-number: QTBUG-38890 Change-Id: I16b75819f88ca7974a581affd8409f7b4038a712 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Testlib: Avoid formatting unneeded messages.Friedemann Kleint2015-10-301-9/+11
| | | | | | | | | Brings down gui/painting/qcolor from 7s to 3s, reducing the calls to printf() helpers from 16E6 to 10E6. Task-number: QTBUG-38890 Change-Id: I34065e6f09fc9a14920b06aa6936908229f3f9c4 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Doc: Update examplesinstallpath to include the repository nameTopi Reinio2015-10-211-1/+1
| | | | | | | | | | | | The examplesinstallpath variable in .qdocconf files defines the path under QT_INSTALL_EXAMPLES where examples are found. To match the way examples are packaged in Qt 5.6, prefix each install path with the repository name. Task-number: QTBUG-48736 Change-Id: I6a35c94fdacaad21cd044411aba02027b9019300 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* Testlib: Output function / total time along with crash dump.Friedemann Kleint2015-10-135-13/+36
| | | | | | | | | | | | | | | | | | | Previously, only QXmlTestLogger had timers to take elapsed times and log them. Move those into class QTestLog for access by the loggers and output the times in the crash dump to make it easier to spot hangs/recursion crashes. Produces: QFATAL : foo() Received signal 11 Function time: 22ms Total time: 23ms A crash occurred in ... Function time: 24ms Total time: 26ms Task-number: QTBUG-47370 Change-Id: Ia530a63104087daffc9a15f68c15d93378b9407e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Libraries: Fix single-character string literals.Friedemann Kleint2015-10-131-1/+1
| | | | | | | Use character literals where applicable. Change-Id: I8e198774c2247c1cc1d852a41b59b301199b7878 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Examples/Doc snippets: Fix single-character string literals.Friedemann Kleint2015-10-131-1/+1
| | | | | | | Use character literals where applicable. Change-Id: I79fa5018f05735201ae35ee94ba0d356fcad1056 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* 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>