summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib
Commit message (Collapse)AuthorAgeFilesLines
* Add testlib selftests for double and for non-finite float and doubleEdward Welbourne2019-02-068-81/+2316
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tidied up the existing float tests in the process. (In particular, s/SUCCESS/PASS/ since that matches real test output.) These verify that QCOMPARE() handles floats and doubles as intended. Extended the existing qFuzzyCompare tests to probe the boundaries of the ranges of values of both types, in the process. Revised the toString<double> that qCompare() uses to give enough precision to actually show some of the differences being tested there (12 digits, to match what qFuzzyCompare tests, so as to show different values rather than, e.g. 1e12 for both expected and actual) and to give consistent results for infinities and NaN (MinGW had eccentric versions for these, leading to different output from tests, which thus failed); did the latter also for toString<float> and fixed stray zeros in MinGW's exponents (which made a kludge in tst_selftest.cpp redundant, so I removed that, too). That's further complicated handling of floating-point types, so let's just keep an eye on how expensive that's getting by adding a benchmark test for QTest::toString(). Unfortunately, default settings only get runs that take modest numbers of milliseconds (some as low as 40) while increasing this with -minumumvalue 100 or more gets the process killed - and I'm unable to find out who's doing the killing (it's not QProcess::kill, ::kill or the QtTest WatchDog, as far as I can tell). So results are rather noisy; the integral tests exhibit speed-ups by factors up to 5, and slow-downs by factors up to 100, between runs with and without this change, which does not affec the integral tests. The relatively modest slow-downs and speed-ups in the floating point tests thus seem likely to be happenstance rather than signal. Change-Id: I4a6bbbab6a43bf14a4089e96238a7c8da2c3127e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add some missing expected_*.tap files for the testlib selftestEdward Welbourne2019-02-017-0/+248
| | | | | | | | Only for tests that have existing expected_*.* files for other formats, though. Change-Id: I34ca1900d88454f300e04d849a608c378009489b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* generate_expected_output.py: placate FutureWarning from pythonEdward Welbourne2019-01-311-1/+1
| | | | | | | | | | Regexes have long specified that a [ as the first character inside a [...] is just a literal [, but apparently we need to escape it now, to avoid a "nested set" FutureWarning. Change-Id: I76a48c9aafb0684a1d6b0d5284fe9852c9ea0e43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* testlib: Add BXPASS and BXFAILOliver Wolff2019-01-296-24/+18
| | | | | | | | | | | | | | | Prioritize blacklisting over QEXPECT_FAIL so that a test that is blacklisted no longer fails if QEXPECT_FAIL returns true unexpectedly. To reflect this state properly, the two values of BXPASS and BXFAIL were added to testlib's output. [ChangeLog][Important Behavior Changes][QtTestLib] Blacklisting of tests will be taken into account for XPASS and XFAIL. A blacklisted test that causes an XPASS will no longer be a fail. Task-number: QTBUG-72928 Change-Id: Ia2232fdc714d405fa3fd9aea6c89eb2836bc5950 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Eliminate some stray misleading paths from expected output filesEdward Welbourne2019-01-165-12/+12
| | | | | | | | | The output files for the tuplediagnostics selftest of testlib had a stray non-canoical path fragment in them; so replaced with its canonical form. Change-Id: Ib421380036c3fb1b91447eb8c87be4ad0dfe5c96 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-11-271-0/+3
|\ | | | | | | Change-Id: I12bcee17e349edd0dd4fd08da76361d1ffb1a727
| * Make developer build tests pass for boot2qtSami Nurmenniemi2018-11-261-0/+3
| | | | | | | | | | | | | | | | Some tests were fixed and others were skipped/blacklisted. Task-number: QTBUG-63152 Change-Id: Ica7df555f8d152ee589865911130525101d4b941 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | macOS: Remove blacklist entries for no longer supported OS versionsTor Arne Vestbø2018-11-121-3/+0
| | | | | | | | | | Change-Id: Iae6552f1fdcf1dea07a03d3788d378af9140d1a7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Fix building tests with -no-guiJüri Valdmann2018-10-201-2/+4
| | | | | | | | | | Change-Id: I37307080e5adc334fcfcdd2fee650d675228a746 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-022-1/+25
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
| * Make tests compile for AndroidLiang Qi2018-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only enables compilation, it doesn't fix any test. Qt on Android supports process, but not TEST_HELPER_INSTALLS. See also acdd57cb for winrt. android-ndk-r10e is used to compile, see http://doc-snapshots.qt.io/qt5-5.11/androidgs.html . corelib/io/{qdir,qresourceengine} need to be fixed later. Done-with: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Change-Id: I34b924c8ae5d46d6835b8f0a6606450920f4423b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * findtestdata: test 'relative to test source'-fixMårten Nordheim2018-06-221-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before the fix is applied this test fails because QFINDTESTDATA will return "/usr/" instead of the folder with the same name in the current directory. The 'usr' folder can't be located 'next to' the application since this does not trigger the issue (QFINDTESTDATA looks for the folder next to the executable early on). So we put it in a subdirectory and change the current working directory to its parent directory. Change-Id: I627679dcb6f2f6954264e23bfc1a71de3bff7203 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* | Improve std::tuple handling in testsSamuel Gaist2018-06-0310-0/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently when doing comparison with std::tuple the fallback toString method is called which returns a Q_NULLPTR thus not allowing proper diagnostic of the values that triggered an error. This patch adds support for std::tuple to improve the tests output readability. [ChangeLog][QtTest][QCOMPARE] Now outputs contents of std::tuple on failure. Change-Id: I046a55e2ce44c3f7728d51e4745120d38aa5e007 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove mention of selftest.qrc from generator script's docEdward Welbourne2018-05-081-3/+1
| | | | | | | | | | | | | | | | This supplements b1945604a78626ed25ad8afe70a64c2eac76a2b4, which removed the qrc file in favor of test/test.pro coding for it. Change-Id: I15507c89ca14fa6e6b8223de671ffff7092272d0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Fix order of mouse selftest in selftests.priMitch Curtis2018-05-071-2/+2
| | | | | | | | | | | | | | | | Put it in alphabetical order like the rest of the list. Change-Id: I3da3bb68d1847f53419bb79490b946c935ebb518 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Add self-tests for QTest::keyPress() and QTest::keyRelease()Mitch Curtis2018-05-0710-0/+172
| | | | | | | | | | | | | | | | They didn't exist up until now, and future patches rely on them, so add them. Change-Id: I8afdb9417263b45d43355c688a813bdf99ea5fc8 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Make generated selftest output match for in-source buildsEdward Welbourne2018-04-171-5/+17
| | | | | | | | | | | | | | | | | | | | | | When generate_expected_output.py is run for an in-source build, the raw output contains no paths to the sources for the script to whittle down, as it does for shadow builds, to just the path from qtbase down. So kludge together some extra regexes that can fix that up and tweak some relevant code to provide them with the data they need. Change-Id: I656d7126087bd9ad20b2af6835fba314d90a171d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | testlib: Ignore line locations from TAP reporter when running selftestsTor Arne Vestbø2018-03-271-1/+3
| | | | | | | | | | | | | | | | This is what the other reporters also do, in various forms. Task-number: QTBUG-67351 Change-Id: I16f2c4e0991176145ee0fbcbbfeeda071603a3c2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-181-2/+1
|\| | | | | | | Change-Id: Icf3b9346117ce7149d8687e4cfa182e7586713f3
| * Stabilize tst_QSignalSpy::waitFunctionPointer_signalEmittedTooLate()Friedemann Kleint2018-03-171-2/+1
| | | | | | | | | | | | | | | | | | Replace qWait()/QCOMPARE() by QTRY_COMPARE(). Change-Id: Ic5233e2f26e6663a3fbcbb2edb09a517feef4564 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-152-3/+2
|\| | | | | | | Change-Id: I8b5a10d897a926078895ae41f48cdbd2474902b8
| * testlib: Silence all Qt logging in selftestsTor Arne Vestbø2018-03-122-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise random debug messages from Qt might mess up the expected vs actual results. The setting of QT_LOGGING_RULES in initTestcase has been removed, as the selftest overrides that for each invocation of a subtests, via the processEnvironment() function. Task-number: QTQAINFRA-1631 Change-Id: I855d31274f8261f8b125df23409353f7101be0e4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | testlib: Add Test Anything Protocol (TAP) reporterTor Arne Vestbø2018-03-1438-2/+3971
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Test Anything Protocol (TAP), was originally Perl's simple text-based interface between testing modules and test harnesses, but has since been adopted by a large number of producers and consumers in many different languages, which allows colorizing and summarizing test results. The format is very simple: TAP version 13 ok 1 - test description not ok 2 - test description --- message: 'Failure message' severity: fail expected: 123 actual: 456 ... ok 3 - test description # SKIP 1..3 The specification [1] is very brief, so the implementation has been based on how typical consumers behave, especially when it comes to the undefined diagnostics block. [1] http://testanything.org/tap-version-13-specification.html Change-Id: I616e802ea380165c678510e940ddc6607d39c92d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Make testlib selftests pass for shadow-buildsTor Arne Vestbø2018-03-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Using QFileInfo to check if the file exists based on the filename alone ignores the fact that all the expected files are embedded as QRC resources. The expectedResult() function already does a similar check, so we can use that directly instead of checking twice if the file exists. Task-number: QTBUG-66981 Change-Id: I0beb8d3503ed49682ae7d7e2a5172922fab5420d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | testlib selftest: Resolve expected files at qmake timeTor Arne Vestbø2018-03-092-221/+3
| | | | | | | | | | | | | | Instead of keeping a static list in a qrc file. Change-Id: I7783db5cad5929cc3f449889e1cbcbb87f7f2637 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-021-0/+1
|\| | | | | | | Change-Id: I967eca8f34584fca3a1e5696978e70f620582a2a
| * QTestlib/selftests: Fix failures due to logging system outputFriedemann Kleint2018-03-021-0/+1
| | | | | | | | | | | | | | | | | | Silence debug output by setting QT_LOGGING_RULES to turn off all debug output. Task-number: QTQAINFRA-1631 Change-Id: I5c2366b4fe4bac341dcfd92f68b6da8071c5b089 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-023-1/+224
|\| | | | | | | Change-Id: I42ec9e6aafc203465cbeb88af70c7af26b7df8ed
| * qtestlib: fix support for pressing multiple mouse buttonsGatis Paeglis2018-03-013-1/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After a37785ec7638e7485112b87dd7e767881fecc114 went in, it become apparent that multi mouse button state handling in qtestlib is non-existent, for details see QTBUG-64030 and QTBUG-63786. What happened behind the scenes often was not what one would expect based on the provided QTest::mouse* input sequence - events went missing, incorrect events were generated, each subsequent test function started with a state set from the function that run earlier. It is easy to see how a minor change in one test could easily affect outcome of other tests. With a37785ec7638e7485112b87dd7e767881fecc114, Qt platform plugins are now responsible for sending explicit mouse button type and state information; qtestlib should take full responsibility now as well. But using the new API from a37785ec7 alone in qtestlib is not sufficient. We need to reset mouse state between each new test function run (we do this at function scope as that fits with the current qtestlib API user expectations). This patch implements the necessary reseting logic. Updated tst_qwindow.cpp::generatedMouseMove() to use QTest::mouse* APIs. That test requires pressing multiple buttons, it was not possible with QTest::mouse* APIs before this patch. Added an auto test for multiple mouse button pressing/release in tests/auto/testlib/selftests/mouse/. And few other tests which are currently QSKIP-ed, but should be considered when re-designing qtestlib APIs. Task-number: QTBUG-64030 Change-Id: I39fdcbc73a467a7463ce2aed622bf22484095635 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | QTestlib: Add formatting for QFlags<>Friedemann Kleint2018-02-166-2/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | Add formatting for registered enumerations based on QMetaEnum and unregistered enumerations as hex values. [ChangeLog][QtTest] QtTest now prints values of QFlags that failed to compare with QCOMPARE. Task-number: QTBUG-65845 Change-Id: I3eae6d20d3c0d72441ca6c4037d9a8dafa4b6357 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QTestlib/selftests: Refactor comparisonFriedemann Kleint2018-02-141-161/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "crashes" subtest has several "expected" reference files. The matching one was previously determined by checking the line count of the output. This however does not work when there are several reference files with identical line count as is now the case with boot2qt. Refactor the comparison code from the QTest/preliminary void return to the bool f(QString* errorMessage) convention so that all files can be tried. While doing so, streamline the code and remove numerous unneeded allocations of strings and regular expressions per compared line. Task-number: QTBUG-65845 Change-Id: I722159d1753f2a36f0e497e315ffd81cb58cac0b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QTestlib/selftests: Add expected_crashes_4.txt for boot2qtFriedemann Kleint2018-02-112-0/+8
|/ | | | | | | | | It has been observed that sometimes the output is not captured by QEMU. Task-number: QTBUG-65845 Change-Id: Iddf888fb3aa019209dbe71f424d87884471784e0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QTestlib/selftests: Refactor the code printing output differencesFriedemann Kleint2018-01-241-8/+73
| | | | | | | | | | | Use qInfo() instead of qDebug() in case QDebug is turned off. If the 'diff' tool is available, write the output to temporary files and run diff on it. Otherwise, print the lines as was before, but onto one stream to avoid indentation by the testlib handler. Change-Id: Ib5a5dfb66ce481b493b85b915aa8c785ecb6b387 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QAbstractItemModelTester: fix the autotestsGiuseppe D'Angelo2018-01-094-0/+314
| | | | | | | | Move the modeltest autotest in the right place, and fix the other autotests that were using it to use the version now in QtTestLib. Change-Id: Ic6838945f616d580f357c872ce0956c341be3b16 Reviewed-by: David Faure <david.faure@kdab.com>
* Tests: Raise minimum supported MSVC version to 2015Friedemann Kleint2018-01-041-2/+2
| | | | | | | | Remove code for older versions and streamline #ifdefs. Task-number: QTBUG-51673 Change-Id: If456567691538b1a1f452111814c5f9eba401c43 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-236-20/+63
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| * Make QCOMPARE print QColor alpha values on failureMitch Curtis2017-11-036-151/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when two colors are equal except for their alpha values, QCOMPARE produces the following failure message: FAIL! : tst_Test::test() Compared values are not the same Actual (colorA): #ff0000 Expected (colorB): #ff0000 By using the HexArgb format instead of the default HexRgb, we can see the full hex string, with alpha values included: FAIL! : tst_Test::test() Compared values are not the same Actual (colorA): #88ff0000 Expected (colorB): #ffff0000 Task-number: QTBUG-55574 Change-Id: Id82c60a1b473ac6025a6f6ac560fce95a910d782 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Force QT_LOGGING_RULES in testlib's selftestEdward Welbourne2017-10-112-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some systems (e.g. Debian/buster) a standard Qt package may install a qtlogging.ini file, e.g. in /etc/xdg/QtProject/, which suppresses QDEBUG output. A ~/.config/QtProject/qtlogging.ini could interfere similarly. This can break the selftest, when run with expected_* files generated without such interference. Likewise, if those expected_* files are generated on a system such similar, they won't work on CI. Given that this caused confusion and delay with integrating the latest set of updates to the expected_* files, it seemed best to save others from similar bafflement. So set a standard value for QT_LOGGING_RULES in both the selftest and the generator script, so we get consistency. Change-Id: I649e2f1f6ead21edf8af051aaee286e369fed064 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | generate_expected_output.py: update generated expected_* filesEdward Welbourne2017-10-11182-1236/+2842
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In selftests.qrc, imposed alphabetic order (on stem of name, then on suffix, effectively treating . as sorting before any letter) while removing old tests and adding new tests and data. Updated all non-csv files and added many missing files. (Not clear on csv support status; the script seems to have dropped it after 5.6, but the test still uses it.) Left expected_crashes* alone (no new files added, no update to old) as I don't get results resembling those anticipated. Omitted printdatatagswithglobaltags, printdatatags due to dangling hspace on output lines, which upset sanity-bot. A change to the test cpp is needed to make it viable to skip that dangling hspace. Change-Id: Iab3fb626c44a91c249b2fb626c12c75ea0317098 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | QTestLib: flush DeferredDelete events between every testDavid Faure2017-10-065-0/+191
|/ | | | | | | | | | | | | | | | | | | | | | | | | This makes qtestlib behave more like real Qt applications with an event loop, where exiting the application does indeed flush deleteLaters. And since every test method is supposed to be independent from other test methods, we should even cleanup between tests. For "app less" tests, no flushing happens. Real life use cases: * A unittest for some code (e.g. KIO job) which uses a socket, runs an event loop until the socket communication is done, and ends. However slotDisconnected() does, as recommended, socket->deleteLater(). So the test finishes before the socket has a chance to actually get deleted, and memory leak tools flag a memory leak, which doesn't actually happen outside the unittest. * Deleting a QWebEngineView with deleteLater is even worse than a memleak, it leads to an assert (from a global object destructor) in QtWebEngine if the view deletion hasn't actually been processed. Change-Id: I18fc822fd26988a0fa4e75313c1947fcaa7d9e56 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Testlib: Format QVector2/3/4D in QCOMPAREFriedemann Kleint2017-08-276-2/+119
| | | | | Change-Id: Ia0709e598d2fddd6c2f448633b484749146265f7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devThiago Macieira2017-08-0832-886/+886
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qwidget.cpp This merge also extends the expected output of the pairdiagnostics teamcity output (added in dev in commit c608ffc56ab37f9a9d5b9c34543126adb89e2b08) after the recent addition of the flowId attribute to the teamcity output (commit 8f036562119dd35ce51dc9230304d893b906bd37 in 5.9). Change-Id: I3868166e5efc45538544fffd14d8aba438f9173c
| * Add flowId to messages when logging in TeamCity formatBorgar Ovsthus2017-08-0431-874/+874
| | | | | | | | | | | | | | | | | | | | | | | | Added flowId='name' to each message when using TeamCity logging format. This is necessary to distinguish separate processes running in parallel. [ChangeLog][QtTest] Added flowId to messages when logging in TeamCity format. FlowId is used to distinguish logging from multiple processes running in parallel. Change-Id: I7f5046c1058ff02770404caa2c9b3a5398f97f6b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | generate_expected_output.py: more refinements to filtering of noiseEdward Welbourne2017-06-131-5/+6
| | | | | | | | | | | | | | | | Two more ways line numbers were making it through. Corrected a doc-string to tell nearer to the truth. Change-Id: I946aaeb936d47fffe50d7ec15e2524992cc9e428 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | generate_expected_output.py: refer to tst_selftests.cpp for test listEdward Welbourne2017-06-131-11/+76
| | | | | | | | | | | | | | | | Document that the saved output is used by tst_selftests.cpp and use a crude parse of it to get the list of subdirs that it actually tests. Change-Id: I73023228c9e547f965b7749dd66de7ef09c3815e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Improve pair-like class handling in testsSamuel Gaist2017-04-0610-0/+186
|/ | | | | | | | | | | | | | Currently when doing comparison with pair-like classes the fallback toString method is called which returns a Q_NULLPTR thus not allowing proper diagnostic of the values that triggered an error. This patch adds support for QPair and std::pair to improve the tests output readability. [ChangeLog][QtTest][QCOMPARE] Now outputs contents of QPair and std::pair on failure. Change-Id: Ib0b4aad7640590d56275b6f1306fb9fb39fa81bc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix tst_Selftest on QEMUSami Nurmenniemi2017-03-312-0/+16
| | | | | | | | | Two changes are needed to pass tst_Selftest on QEMU 1. Pass QEMU specific env variables to the subtests 2. Ignore output on stderr on some tests when running on QEMU Change-Id: Ie1f722fd183aac5973e87d408005e06cbafcde17 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Properly use the "process" featureUlf Hermann2017-02-271-4/+4
| | | | | | | | | | | | Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess headers, exclude the sources from compilation when switched off, guard header inclusions in places where compilation without QProcess seems supported, drop some unused includes, and fix some tests that were apparently designed to work with QT_NO_PROCESS but failed to. Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Drop unnecessary dependencies from some testsUlf Hermann2017-01-101-1/+1
| | | | | | | | | The future tests don't need QtConcurrent as QFuture and friends are in QtCore. The printdevice test doesn't use QtNetwork and the lancelot as well as the testlib tests don't use QtXml. Change-Id: I150ac99b36682aa23ad22ba943266eb0f0952838 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Disable core dumps for selftests that are meant to be crashingTor Arne Vestbø2016-12-081-1/+3
| | | | | | Task-number: QTBUG-55155 Change-Id: I26a1461f35f916f3980fcb18cdddf3502e22fc90 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>