summaryrefslogtreecommitdiffstats
path: root/src/testlib/qxmltestlogger.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Testlib: Output function / total time along with crash dump.Friedemann Kleint2015-10-131-6/+3
| | | | | | | | | | | | | | | | | | | 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>
* 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>
* Add QtInfoMsgKai Koehne2015-01-091-1/+3
| | | | | | | | | | | | | | Add an 'info' message type that can be used for messages that are neither warnings (QtWarningMsg), nor for debugging only (QtDebugMsg). This is useful mainly for applications that do not have to adhere to the 'do not print anything by default' paradigm that we have for the Qt libraries itself. [ChangeLog][QtCore][Logging] QtInfoMsg got added as a new QtMsgType. Use the new qInfo(), qCInfo() macros to log to it. Change-Id: I810995d63de46c41a9a99a34d37c0d417fa87a05 Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Add support for blacklisting test functionsLars Knoll2014-09-211-0/+4
| | | | | | | | | | | | | | | | | We need to have a finer grained control over the tests we skip in our CI system. This adds a blacklisting mechanism that allows blacklisting individual test functions (or even test data) using a set of predefined matching keys for the operating system and some other relevant variables. QTestlib will search for a file called BLACKLIST in the test directory and parse it if found. The file contains a simple ini style list of functions to blacklist. For details see qtestblacklist.cpp. Change-Id: Id3fae4b264ca99970cbf9f45bfb85fa75c1fd823 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use new QLibraryInfo::build() in testlib to log build information.Friedemann Kleint2014-02-271-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This produces: ********* Start testing of tst_QtJson ********* Config: Using QtTest library 5.3.0, Qt 5.3.0 (Feb 13 2014, GCC 4.6.3, 64 bit, debug build) PASS : tst_QtJson::initTestCase() <?xml version="1.0" encoding="UTF-8"?> <TestCase name="tst_QtJson"> <Environment> <QtVersion>5.3.0</QtVersion> <QtBuild>Qt 5.3.0 (Feb 13 2014, GCC 4.6.3, 64 bit, debug build)</QtBuild> <QTestVersion>5.3.0</QTestVersion> </Environment> <?xml version="1.0" encoding="UTF-8" ?> <testsuite errors="1" failures="1" tests="42" name="tst_QtJson"> <properties> <property value="5.3.0" name="QTestVersion"/> <property value="5.3.0" name="QtVersion"/> <property value="Qt 5.3.0 (Feb 13 2014, GCC 4.6.3, 64 bit, debug build)" name="QtBuild"/> </properties> <Environment> <QtVersion>5.3.0</QtVersion> <QtBuild>Qt 5.3.0 (Feb 13 2014, GCC 4.6.3, 64 bit, debug build)</QtBuild> <QTestVersion>5.3.0</QTestVersion> </Environment> [ChangeLog][QtTest] Tests now output build information. Change-Id: I0ab473371575f2b807db725256805b8bffea3454 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Testlib: Use QString for messages in QAbstractTestLogger::addMessage()Friedemann Kleint2014-01-211-3/+3
| | | | | | | | Task-number: QTBUG-35743 [ChangeLog][QtTest][Windows] Use correct UTF-8 encoding for XML test results on platforms with different console encoding. Change-Id: Ice9d03192098f931e5dac358928e0c4421ab715e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Testlib: Add test duration to xml outputFrederik Gladhorn2014-01-131-1/+15
| | | | | | | | | | | [ChangeLog][QtTest] Added test duration to xml output. When running tests with xml output a new tag of the form <duration msecs="123"/> is added to each test function and the test as a whole. Change-Id: Ibc4db066b6acf5fac6c578f5e5ca5ce4b5d8ea8e Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Fix error in XML and Xunit formatted benchmark output.Mirko Boehm (AWS)2013-03-221-1/+2
| | | | | | | | | | | | The number of iterations was not respected for XML output, unlike for plain text output. With this fix, benchmarks report the same result for plain text and XML formatted output. Compare the change to qplaintextlogger.cpp:274. Change-Id: Ieb3e5812e18d93c36847bef0417f779efd300f86 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Daniel Molkentin <daniel@molkentin.de> Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Use UTF-8 in the QtTest data and benchmark tagsThiago Macieira2012-06-091-2/+2
| | | | | | | | | | | Future-proofing. Since Qt source code is now mandated to be in UTF-8, it is entirely possible that someone will use non-ASCII in data tags. Though it would be interesting to see how to access them from the Windows command-line. Change-Id: I880fc312432b62143888ff1e1d9abbd54f704601 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* [QTBUG-22847] Compile with C++11 compilerMarc Mutz2012-02-171-1/+1
| | | | | | | | | | | | | | C++11 supports user-defined string literals, which makes the C++98-accepted literal string concatenation sequence "foo"MACRO illegal under C++11. The solution is to add whitespace between the string literal and the macro. For symmetry, this patch adds it on both sides. Change-Id: Ie0c698f610986c4d1b12dc2083489043b696936d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Stop using QTest::qt_snprintf() in testlib.Jason McDonald2011-12-121-1/+1
| | | | | | | | After the previous commit, QTest::qt_snprintf() is equivalent to qsnprintf(), so just use that instead. Change-Id: I89ad6e3749ba5efb1926b0b618a904e8baca9f52 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make testlib use #include consistently.Jason McDonald2011-10-211-5/+5
| | | | | Change-Id: I36b5da3f832d2588072405d93143173edc29f4af Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Pass log file name when constructing loggers.Jason McDonald2011-09-051-4/+4
| | | | | | | | | | | Pass the filename when creating the logger rather than when commencing output. This will simplify forthcoming changes for running multiple loggers. Change-Id: I563aa97661caf279a5dcccb1321ff3ce4725b332 Reviewed-on: http://codereview.qt.nokia.com/4116 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix various trivial formatting issues.Jason McDonald2011-09-011-1/+1
| | | | | | Change-Id: Ifa2a2dd2aa26dab178ec1334376db42fc3ebb355 Reviewed-on: http://codereview.qt.nokia.com/4029 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove ability to run tests in random order.Jason McDonald2011-08-311-18/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the undocumented feature that allows test functions to be executed in random order. The feature was designed to expose unintended dependencies between test functions -- test functions are only supposed to depend on the initTestCase() and init() functions. Aside from the lack of documentation, there are a number of problems with this feature. Most importantly, running the tests in random order has only a 50% chance of exposing dependencies between test functions. A better strategy would be to run the test functions in reverse order and complain if that produces different results to running the tests in the normal order. Additionally, the random order is not deterministic, so even if a dependency is exposed during a test run, there's no guarantee that it will be exposed again. The feature allows the user to optionally supply a random seed to make the "random" order deterministic, but as rand() implementations are not identical across platforms, even that does not guarantee that dependencies between test functions will be exposed deterministically. Change-Id: I39eac34c532ccb988116778bbc5ab05d835874c5 Reviewed-on: http://codereview.qt.nokia.com/3720 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove circular dependency in testlib logging codeJason McDonald2011-08-291-2/+2
| | | | | | | | | | | Pass the output file name from the QTestLog to the test logger when commencing logging rather than having the logger call back into the QTestLog. Change-Id: Id484635f9fcfca08a66c92f3442887e9473b6f9b Reviewed-on: http://codereview.qt.nokia.com/3454 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+459
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12