summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-236-11/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/wince80colibri-armv7-msvc2012/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/corelib/global/qnamespace.h src/corelib/global/qnamespace.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/tools/tools.pri src/network/ssl/qsslconfiguration_p.h src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/plugins/platforms/windows/windows.pri src/src.pro src/tools/bootstrap/bootstrap.pro src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/dialogs/qfilesystemmodel.cpp tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt Change-Id: I4d2ac78f0dcc97f008186bbbc769c6fe588ab0e5
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-196-11/+12
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp src/network/access/qnetworkaccessmanager.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h src/widgets/widgets/qlineedit_p.cpp src/widgets/widgets/qlineedit_p.h src/winmain/winmain.pro tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp tools/configure/configureapp.cpp Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
| | * QTest: Fix printing of values of Q_ENUMsThiago Macieira2016-05-085-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | QMetaEnum::key(n) returns the n-th key, which is not necessarily the one of value n. For the key of value n, we want QMetaEnum::valueToKey(n). Change-Id: Ic90fe6b1cbe84978a02fffff141bf4a06074917a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QTestLib: support explicit bool conversions in QVERIFYGiuseppe D'Angelo2016-05-046-114/+143
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QTestLib] It is now possible to use variables of types with an explicit operator bool in the QVERIFY macro. Change-Id: I2685df164a616f6a065d689867daa9ea1de78e08 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | QTest: support nullptr in QCOMPAREMarc Mutz2016-04-086-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to write QCOMPARE(ptr, nullptr); instead of QVERIFY(ptr); Task-number: QTBUG-49973 Change-Id: I6e1327d4327bcf17bd9b59de4352fdcaae98ac27 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QtTest: Remove Windows CE.Friedemann Kleint2016-04-061-1/+1
|/ / | | | | | | | | | | | | | | | | Remove #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library and tests. Task-number: QTBUG-51673 Change-Id: I552b3fe8d6e0eb7c8c7b3a3d41558e5e21904dd2 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QtTest/generate_expected_output.py: Add TeamCity logging format.Friedemann Kleint2016-03-171-1/+1
| | | | | | | | | | | | | | | | | | Adapt the script to generate output for the new TeamCity format added by fbd6acedac8e1f4ee624cb713055fcad1ceabf96. Change-Id: I9435382ec3daf80428c324c58434aa951841bf08 Reviewed-by: Borgar Øvsthus <borgar.ovsthus@fmcti.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | QtTest: Add formatting for QColor.Friedemann Kleint2016-03-176-110/+149
| | | | | | | | | | | | | | | | | | When a QCOMPARE of values of type QColor fails, their name will now be printed. Task-number: QTBUG-51124 Change-Id: I76565daa338f038ea4f452e47705e638d94eaeee Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | Make it possible to preserve the library/plugin path in tst_selftestChristian Strømme2016-02-231-0/+3
| | | | | | | | | | | | | | | | | | If QT_PRESERVE_TESTLIB_PATH is set, then LD_LIBRARY_PATH and QT_PLUGIN_PATH won't be filtered out for the sub-tests started by tst_selftest. Change-Id: Ic43ba9b4d882ee36b2f7495b1c880f26aefd2629 Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
* | Add TeamCity logging feature to testlibBorgar Ovsthus2016-01-2333-2/+919
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-2148-816/+576
| | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-182-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/painting.pri src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro tests/auto/corelib/tools/qlocale/test/test.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp tools/configure/environment.cpp Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
| * Fix compilation for WinRTMaurice Kalinowski2015-12-142-2/+2
| | | | | | | | | | | | | | | | TEST_HELPER_INSTALLS cannot be used on platforms with no QProcess support. Change-Id: I2a6a283d94ca4487fc628449c53fc37140dd291d Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | generate_expected_output: Open the file as binary.Robin Burchell2015-11-061-1/+1
| | | | | | | | | | | | | | Otherwise write() for my python (OS X 2.7) wants strings, which is incorrect. Change-Id: Ibd9d050646d1039ba8370d121dd25756ceffdb7a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | Fix QCOMPARE with enum classes.Robin Burchell2015-11-065-80/+116
| | | | | | | | | | | | | | | | As these are strongly typed, they won't implicitly convert to int, so make sure to cast explicitly. Change-Id: Ic8daa31c528bbd8f399ab401d0963e13db191312 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Testlib: Output total test time in plain text logger.Friedemann Kleint2015-10-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This makes it easier to spot slow tests. Produces: Totals: 314 passed, 0 failed, 0 skipped, 0 blacklisted, 137ms ********* Finished testing of tst_QStringRef ********* Task-number: QTBUG-38890 Change-Id: Iaee4dd677fd8f18b82f7c9c4934eb5b1119ade43 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-142-5/+22
|\| | | | | | | | | | | | | | | | | Conflicts: tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro Change-Id: Ia93ce500349d96a2fbf0b4a37b73f088cc505c6e
| * Testlib: Output function / total time along with crash dump.Friedemann Kleint2015-10-132-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Tests: Always verify whether QTemporaryDir/File creation succeeded.Friedemann Kleint2015-09-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | Use QVERIFY2() with QTemporaryDir/File::errorString() consistently. Attempt to catch issues like the below warning and follow-up issues. QSYSTEM: tst_QFiledialog::clearLineEdit() QFileSystemWatcher: FindNextChangeNotification failed for "C:\Users\qt\_____aaaaaaaaaaaaaaaaaaaaaa" (Access is denied.) Task-number: QTBUG-47370 Change-Id: I58a6e87c502627e976efa62ad73c912f3b2d49fa Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-09-251-0/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/io.pri src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/network/socket/qabstractsocket.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h src/widgets/styles/qgtkstyle.cpp tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro tests/auto/dbus/qdbusconnection/qdbusconnection.pro tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp Change-Id: I347549a024eb5bfa986699e0a11f96cc55c797a7
| * Testlib/Windows: Output crash information on stdout instead of stderr.Friedemann Kleint2015-09-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Tests: Remove CONFIG += parallel_test.Friedemann Kleint2015-09-053-3/+0
|/ | | | | | | The keyword no longer has a meaning for the new CI. Change-Id: Ibcea4c7a82fb7f982cf4569fdff19f82066543d1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-063-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Change how QDebug escapes QStrings in the outputThiago Macieira2015-08-063-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Important Behavior Changes] QDebug output for QStrings changed compared to Qt 5.5.0 to more closely match the output of previous Qt versions. Like Qt 5.5.0, QDebug will escape non-printable characters, the backslash and quote characters, but will no longer escape the printable characters. Task-number: QTBUG-47316 Change-Id: I52dd43c12685407bb9a6ffff13f62ef68cbc80c5 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | QTestLib: Add macros QTRY_VERIFY2_WITH_TIMEOUT(), QTRY_VERIFY2().Friedemann Kleint2015-07-225-69/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix sub test float of tests/auto/testlib/selftests/tst_selftests for MSVC 2015.Friedemann Kleint2015-07-171-2/+2
| | | | | | | | | | | | | | | | | | From MSVC 2015 onwards, MSVC formats floats using printf("%g") like g++, so the fiddling of the expected output needs to restricted accordingly. Change-Id: I6e7f78e5e90f70886a8b2ef37c0fb9bf82b5e1a3 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Output registered enumeration names in QCOMPARE.Friedemann Kleint2015-06-125-83/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-037-1/+148
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * TestCase: Also check main source path when looking for test dataCaroline Chao2015-05-057-1/+148
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Improve error handling in qtestlibLars Knoll2015-04-211-1/+3
|/ | | | | | | | | | | | | 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>
* Make the printing of complex byte arrays prettierThiago Macieira2015-02-155-46/+46
| | | | | | | | | | | | 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-1147-329/+329
| | | | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-215-5/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * Autotest: Selftests fail in UTC timezoneRainer Keller2015-01-195-5/+5
| | | | | | | | | | | | | | | | | | | | | | Selftests for testlib fail when executed in UTC timezone because local and UTC are the same, but expected to be different. A custom timezone is used instead. Debug output of qCompare does only handle local and non-local timezones, using new Qt5 features allows to show the correct timezone in format string. Change-Id: I753884a12370952b7b62a90d62896db4f2d3d1b4 Reviewed-by: Jason McDonald <macadder1@gmail.com>
* | QDebug: pretty-print QStrings and QStringRefsThiago Macieira2015-01-113-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QDebug] Printing of QStrings and QStringRefs whenever "noquote" is not active now prints the strings in a format that can be copied back to C++ code. All characters that aren't printable in US-ASCII are escaped (this includes printable Unicode characters outside of US-ASCII). Pretty-printing will not respect QTextFormat padding or field widths. Change-Id: I169a8a0508e24693f5652f0129defe7f709e5d08 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add QtInfoMsgKai Koehne2015-01-096-3/+29
|/ | | | | | | | | | | | | | 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-2447-893/+517
| | | | | | | | | - 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-2144-57/+57
| | | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-05-221-2/+4
|\ | | | | | | Change-Id: Ia36e93771066d8abcf8123dbe2362c5c9d9260fc
| * QNX: Fix tst_selftestBernd Weimer2014-05-161-2/+4
| | | | | | | | | | | | | | | | GRAPHICS_ROOT and TZ environment variables are needed in child processes in order to successfully run the auto test selftests. Change-Id: I7befabd535b4c47b1e75acbe3d6158d0d9b811b3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | QSignalSpy: Added template function pointer constructorKeith Gardner2014-04-231-0/+168
| | | | | | | | | | | | | | | | | | Added the function pointer constructor to QSignalSpy to take advantage of the new connect syntax. Change-Id: I94218a096c677cdba73e1b2cfa8b9c09bc28145f Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
* | Use new QLibraryInfo::build() in testlib to log build information.Friedemann Kleint2014-02-27101-2/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Improve error reporting in selftests of testlib.Friedemann Kleint2014-02-251-8/+14
|/ | | | | | | | Output the file name and fix line number to be 1..n. Change-Id: I3ba7f84b99ce3664bc3e403b230307511b15fe1f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Make the printing of complex Unicode in a QString prettierThiago Macieira2014-02-168-72/+72
| | | | | | | | | | | | | | | This also has the advantage of not requiring the use of the locale codec. Quite an advantage if you're debugging the locale codec. But it's mostly so that we don't get question marks that hide the difference we were trying to locate. [ChangeLog][QtTest] QtTest now prints an escaped version of QStrings that failed to compare with QCOMPARE. That is, instead of converting non-printable characters to question marks, QtTest will print the Unicode representation of the character in question. Change-Id: I44c1ef3246b188c913dacd3ca4df02581356ea41 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add a CSV logging feature to the benchlibThiago Macieira2014-02-148-2/+68
| | | | | | | | | | | | | | | This is only useful for logging benchmarks, since it won't print test passes, failures, etc. It's useful for importing to spreadsheets to do number-crunching. [ChangeLog][QtTest]Added a CSV logging mode that is suitable for importing benchmark results into spreadsheets. This can be enabled by the -csv option on the command-line. The CSV logging mode will not print test failures, debug messages, warnings, etc. Change-Id: I245d6f86bb380645c9bc0d748cf474b3ed42cab8 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Testlib: Use QString for messages in QAbstractTestLogger::addMessage()Friedemann Kleint2014-01-216-24/+67
| | | | | | | | 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/generate_expected_output.py: Fix encoding.Friedemann Kleint2014-01-181-1/+1
| | | | | | | | | | | | | | | Do not apply additional encoding when reading process output. Fixes errors when encountering UTF-8: Traceback (most recent call last): File "./generate_expected_output.py", line 117, in <module> generateTestData(path) File "./generate_expected_output.py", line 106, in generateTestData out.write(data.decode('utf-8')) UnicodeEncodeError: 'ascii' codec can't encode character u'\xdc' in position 5485: ordinal not in range(128) Change-Id: Ib827787a59a18b4d3d0601645856517f43c01fc3 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Testlib/generate_expected_output.py: Pass tests as command line arguments.Friedemann Kleint2014-01-181-3/+8
| | | | | | | Evaluate command line arguments and use directories only when empty. Change-Id: I818ec13c686018a3f607e91174e57d8f8bbf15f7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Update test result generator script to set duration to 0Frederik Gladhorn2014-01-181-1/+1
| | | | | | | | The actual code in testlib now indents the duration tag when it is for a function. Change-Id: Iee62db9c81f11dc54e57f166bf9fb2b7012b7e03 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>