summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestcase.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-291-1/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qml_module.prf mkspecs/features/qt_common.prf src/gui/text/qzip.cpp src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/windows/array.h src/testlib/qtestcase.cpp src/widgets/dialogs/qfilesystemmodel.h Change-Id: Ie41c5868415b81f7693c80e045497035504bb210
| * testlib: added env QTEST_FUNCTION_TIMEOUT for single test function timeoutLiang Qi2016-04-271-1/+14
| | | | | | | | | | | | | | | | | | | | | | This is a regression with 5.5, it causes some customer test functions crash. d3d10cf2 introduced the 5 minutes timeout. The timeout could be changed after this. Task-number: QTBUG-52402 Change-Id: I8940bbde5004b4d888732b551274f079ddf20563 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-131-0/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/testlib/qtestcase.cpp src/testlib/qtestcase.qdoc Change-Id: Ied3c471dbc9a076c8de33d673bd557e88575609d
| * QTestlib: Document newly added enumeration value KeyAction:Shortcut.Friedemann Kleint2016-04-111-0/+1
| | | | | | | | | | | | | | | | | | | | Amends change 0e342fce4c665d72a50147c4f4b30ea08cc6c87b, fixing a qdoc warning: qtbase/src/testlib/qtestcase.qdoc:524: warning: Undocumented enum item 'Shortcut' in QTest::KeyAction Change-Id: I7a7116bd5ff160c4a13f2fb0f9512f0d71385a4b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * Improve gdb backtrace handlingFrederik Gladhorn2016-04-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Long backtraces would get cut off in the terminal, this is especially bothersome when having lots of threads. Make sure that the output is complet by setting height=0 for gdb. The gdb manual states: "If you specify a height of either unlimited or zero lines, gdb does not pause during output no matter how long the output is. This is useful if output is to a file or to an editor buffer." Change-Id: I282054bc9e205d67d3076e37d5c928475803b22d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | QtTest: eradicate all Q_FOREACH loopsMarc Mutz2016-02-291-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... by replacing them with C++11 ramge-for loops. In one case, I took the liberty to remove a useless if(isEmpty()) check around a for loop. Now that we don't use Q_FOREACH anymore, we don't incur the copy for empty containers anymore. Left the indention of the loop level to avoid code churn. Saves 1.8KiB in text size on optimized GCC 5.3 Linux AMD64 builds. Change-Id: I1b1fb34847f6a631f0d580fd5261c7f5fed8475c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Improve QCOMPARE output of char comparisonsAllan Sandfeld Jensen2016-02-251-1/+47
| | | | | | | | | | | | | | | | | | Make actual and expected values of char tests more useful by using C syntax. This means we can actually read non-printable characters. Task-number: QTBUG-51294 Change-Id: I031e15916a2882c0499b6217ae1649d4eea09eb4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-111-1/+3
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemwatcher_win.cpp src/corelib/plugin/plugin.pri src/plugins/platforms/cocoa/qcocoaaccessibility.mm tests/auto/corelib/tools/qlocale/tst_qlocale.cpp Change-Id: Id6824631252609a75eff8b68792e4d10095c8fc1
| * Reduce allocations by using reserve()Sérgio Martins2016-02-071-1/+3
| | | | | | | | | | Change-Id: If34fa53402985f6b3c5e7217bce4a1177af835b6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-5/+5
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/dbus/qdbusconnection_p.h src/dbus/qdbusintegrator.cpp src/dbus/qdbusintegrator_p.h tests/auto/corelib/io/qdir/qdir.pro tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
| * Use QFileInfo::exists(f) instead of QFileInfo(f).exists()Tobias Koenig2016-01-211-5/+5
| | | | | | | | | | | | | | QFileInfo::exists(f) is somewhat faster than the version which creates an temporary object. Change-Id: I5f931a86d9dfad57d99efe04ca115422de43def9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add TeamCity logging feature to testlibBorgar Ovsthus2016-01-231-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows TeamCity to parse realtime test-results instead of using post-build XML Report Processing. This does not support logging of benchmarks. [ChangeLog][QTest] Added a new logging mode that allow test-results to be parsed on-the-fly when using Jetbrains TeamCity as CI-server. This mode is enabled by using the -teamcity option on the command-line. Change-Id: Ie730beb643043eb0f448f99abe6c0b5ac48aaf03 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add Intel copyright to files that Intel has had non-trivial contributionThiago Macieira2016-01-211-0/+1
| | | | | | | | | | | | | | | | | | I wrote a script to help find the files, but I reviewed the contributions manually to be sure I wasn't claiming copyright for search & replace, adding Q_DECL_NOTHROW or adding "We mean it" headers. Change-Id: I7a9e11d7b64a4cc78e24ffff142b506368fc8842 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devFrederik Gladhorn2016-01-081-4/+0
|\| | | | | | | | | | | Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
| * 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>
* | Testlib: Gather methods in a class.Friedemann Kleint2015-12-151-118/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In tests with many data sets and init()/cleanup() functions, a significant time is spent looking up the methods "init"/"cleanup"and the test methods in qInvokeTestMethodDataEntry(). Introduce a class TestMethods that aggregates the optional methods and the test methods as a std::vector<QMetaMethod>. Its method list can be populated either by inspecting the QMetaObject or from the command line. The class is instantiated on the stack. Previously, 2 data structures existed for storing the methods to execute obtained from the command line (array of class TestFunction and an exported StringList testFunctions for QML). Remove the custom TestFunction and use only the (QML) testFunctions list for populating the new class. Speeds up tst_QChar::normalization() from 340ms to 300ms on an average Linux machine. Task-number: QTBUG-38890 Change-Id: I80b488e7249ce031b6d6c8442e53aa87bd2edd42 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Testlib: Move documentation from qtestcase.cpp to qtestcase.qdoc.Friedemann Kleint2015-12-021-1255/+5
| | | | | | | | | | | | | | | | | | Previously, one had to skip 1300 lines of documentation before seeing the actual code in this file. Task-number: QTBUG-38890 Change-Id: I5a375cbe6b62575f6040e952a0931ac8ea2dd557 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | Use Q_UNLIKELY for every qFatal()/qCritical()Marc Mutz2015-11-291-4/+4
|/ | | | | | | | | | | | | | | | | | | | | If, after checking a condition, we issue a qFatal() or a qCritical(), by definition that check is unlikely to be true. Tell the compiler so it can move the error handling code out of the normal code path to increase the effective icache size. Moved conditional code around where possible so that we could always use Q_UNLIKELY, instead of having to revert to Q_LIKELY here and there. In some cases, simplified the expressions newly wrapped in Q_UNLIKELY as a drive-by. Change-Id: I67537d62b04bc6977d69254690c5ebbdf98bfd6d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Testlib: Output function / total time along with crash dump.Friedemann Kleint2015-10-131-4/+11
| | | | | | | | | | | | | | | | | | | 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>
* 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>
* 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>
* QTestLib: Add macros QTRY_VERIFY2_WITH_TIMEOUT(), QTRY_VERIFY2().Friedemann Kleint2015-07-221-2/+42
| | | | | | | | | | | | | | 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-211-0/+2
| | | | | | | | | | | 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>
* 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>
* Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-07-011-16/+43
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Merge remote-tracking branch 'origin/5.5.0' into 5.5Liang Qi2015-06-271-16/+21
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafiledialoghelper.h Manually fixed src/testlib/qtestcase.cpp to return the right type. Change-Id: Id1634dbe3d73fefe9431b9f5378846cb187624e4
| | * QTest: Make qExtractTestData() return the created QTemporaryDirv5.5.0-rc1Marc Mutz2015-06-141-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... 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>
* | QtTest: don't hold QBenchmarkResults in QListMarc Mutz2015-06-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-031-1/+23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Add GPU_BLACKLIST support to QTestLibLaszlo Agocs2015-05-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-051-0/+21
| | | | | | | | | | | | | | | | | | | | | | 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>
* | 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>
* | Improve error handling in qtestlibLars Knoll2015-04-211-3/+88
|/ | | | | | | | | | | | | Dump a stack trace on Linux if the process crashes. This will give us much better log output in the new CI system. In addition, create a watch dog thread, that kills the test if the test function times out (ie. hangs) Implementations of the stack trace dumping for Mac and Windows are still pending. Change-Id: I65426c5afe290a0a2019b881436a0c278f1cafaf Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Add XCTest logger backend to QtTestLibTor Arne Vestbø2015-03-271-1/+13
| | | | | | | | | | | | | | | | Will be active when running test apps through Xcode's 'test' action, and reports QtTestLib test objects and functions to Xcode as XCTest cases. This allows running tests on both iOS Simulator and iOS devices from the command line, through xcodebuild, without relying on any 3rd party tools. It also integrates Qt test failures and passes into the Xcode IDE, which may be useful for closer investigation of test failures. The feature is limited to Xcode 6.x. Change-Id: I33d39edbabdbaebef48d2d0eb7e08a1ffb72c397 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Testlib: Fix cleanupTestCase not called when last test blacklistedRainer Keller2015-03-121-0/+3
| | | | | Change-Id: I23810b4bd086c393325e56f7779fe7f7f01e76cf Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QTest: Print hex instead of octal for QByteArray QCOMPARE failuresThiago Macieira2015-03-111-6/+25
| | | | | Change-Id: Ia0aac2f09e9245339951ffff13c65b2234d01ad0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Fix various qdoc-warnings.Friedemann Kleint2015-02-251-1/+1
| | | | | | | | | | qtbase/src/corelib/itemmodels/qitemselectionmodel.cpp:1199: warning: Undocumented parameter 'model' in QItemSelectionModel::modelChanged() qtbase/src/corelib/plugin/qpluginloader.cpp:420: warning: Can't link to 'staticPlugin()' qtbase/src/gui/text/qtextdocument.cpp:1452: warning: No such parameter 'from' in QTextDocument::find() qtbase/src/testlib/qtestcase.cpp:2770: warning: No documentation for 'QTest::qExtractTestData()' Change-Id: I76758dbdf3ad7b0ae1f14de0407a6fde523827d0 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Testlib: Add function to extract files from resources to diskRainer Keller2015-02-181-0/+54
| | | | | Change-Id: I7ae1cdfea751a759298cf277e36cfef7a9c46edb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Make the printing of complex byte arrays prettierThiago Macieira2015-02-151-0/+66
| | | | | | | | | | | | Similar to what we've done to QString, only we print each byte that is not ASCII as \OOO (octal representation). [ChangeLog][QtTest] QtTest now prints an escaped version of QByteArrays that failed to compare with QCOMPARE, instead of the hex dump. Change-Id: I6a8c43f138c66c998280998a242b43cd579666a0 Reviewed-by: Richard J. Moore <rich@kde.org>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>