summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/benchliboptions
Commit message (Collapse)AuthorAgeFilesLines
* Port two tests' QAbstractEventDispatcher overrides to V2Thiago Macieira2024-03-131-8/+5
| | | | | Change-Id: I83dda2d36c904517b3c0fffd17b52c421bf08d5b Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* Change license for tests filesLucie Gérard2024-02-041-1/+1
| | | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QTest: add opt-in changing QCOMPARE etc to exit with throw, not returnMarc Mutz2024-01-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add exception classes and use them to change the control flow for QTEST_{FAIL,SKIP}_ACTION from return'ing from just the immediate function to the full way to the QTestLib infrastructure, here we filter them out. There are three modes: - If QT_NO_EXCEPTION, then we return - If QTEST_THROW_ON_... is also defined, #error out - Otherwise, if QTEST_THROW_ON_... is defined, always throw - Otherwise, the decision is made at runtime (with defaults read from QTEST_THROW_ON_... environment variables). Three selftests depend on the old behavior, as they explicitly check that multiple FAIL SKIP etc emerge, which the new framework, of course, prevents. Locally disable throwing at the test function level. Add initial docs and enable exceptions in all of the selftest subprograms to facilitate switching between the two runtime-selectable modes. [ChangeLog][QtTest] Added QTEST_THROW_ON_FAIL and QTEST_THROW_ON_SKIP C++ macros and environment variables that, when defined, change how QCOMPARE/QVERIFY/QSKIP etc exit the test function on failure. Instead of a return, exiting only the immediately-surrounding function, they throw a special exception instead, thereby exiting from subfunctions of the test function, all the way to QtTestLib. Fixes: QTBUG-66320 Change-Id: I96c38d2a1dcdd9de84942cf448a8bbf3ab6d3679 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* tests: Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-171-6/+2
| | | | | | | Pick-to: 6.5 Change-Id: I8d106554bb86ac1ec9bb7a4083de4c376bcbab1d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-231-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-08-031-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't use PUBLIC_LIBRARIES for tests and test helpersAlexandru Croitor2022-07-281-1/+1
| | | | | Change-Id: I9b7404e1d3a78fe0726ec0f5ce1461f6c209e90d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Guard the use of QWinEventNotifier in testsAlexey Edelev2022-05-171-0/+2
| | | | | | | | | Add the Q_OS_WIN32 guard for the include of QWinEventNotifier. Change-Id: I7824b2ee236a370c83fd85a2f594a39cf36b36e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Use SPDX license identifiersLucie Gérard2022-05-161-27/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix compiler warnings from int/size_t mismatchesVolker Hilsheimer2021-04-281-3/+3
| | | | | | | | Cast size_t return from std::vector explicitly to int to silence compiler warnings. Change-Id: I0c425b3cec7feec0712e1173ab7e60b28695d6d7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove .prev_CMakeLists.txt filesJoerg Bornemann2021-01-121-15/+0
| | | | | | | | | | Those serve no purpose anymore, now that the .pro files are gone. Task-number: QTBUG-88742 Change-Id: I39943327b8c9871785b58e9973e4e7602371793e Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-071-9/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Replace QtTest headers with QTestDavid Skoland2020-12-221-1/+3
| | | | | | | | | | | Complete search and replace of QtTest and QtTest/QtTest with QTest, as QtTest includes the whole module. Replace all such instances with correct header includes. See Jira task for more discussion. Fixes: QTBUG-88831 Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44 Pick-to: 6.0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-232-3/+3
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QAbstractEventDispatcher: change event dispatcher timer interval to qint64Liu Yang2020-09-211-1/+1
| | | | | | | | | Resolve remaining Qt6 TODO [ChangeLog][QtCore][QAbstractEventDispatcher] The signature of the abstract virtual registerTime function now takes a qint64 value for the interval parameter. Change-Id: I10166ad5cfb455edc404d465a3731ff094a8977e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove most compiler warnings about missing overridesLars Knoll2020-09-111-10/+10
| | | | | | | | | | | | Remove around 1000 compiler warnings about missing overrides in our auto tests. This significantly reduce the compiler warning noise in our auto tests, so that one can actually better see the real problems inbetween. Change-Id: Id0c04dba43fcaf55d8cd2b5c6697358857c31bf9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Get rid of hasPendingEvents() and flush()Lars Knoll2020-09-061-2/+0
| | | | | | | They are unused. Change-Id: I77383f2be45551401ed9c2f88285511134cc8b0d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Regenerate tests with new qt_ prefixed APIsAlexandru Croitor2020-07-092-2/+2
| | | | | | | | Use pro2cmake with '--api-version 2' to force regenerate projects to use the new prefixed qt_foo APIs. Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Enable testlib selftestsLeander Beernaert2020-03-181-0/+4
| | | | | | | | | | | This patch adds the equivalent of testlib's selfcover.pri and is enabled for both testlib and the respective selftests test. This patch also fixes the selftests so that they can run without FEATURE_testlib_selfcover enabled. Change-Id: I15913de2d572ac79804ce3e652cee66de74318f8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-02-131-11/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/boxes/scene.h src/corelib/Qt5CoreMacros.cmake src/corelib/Qt6CoreMacros.cmake src/network/ssl/qsslsocket.cpp src/network/ssl/qsslsocket.h src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp src/testlib/CMakeLists.txt src/testlib/.prev_CMakeLists.txt tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp Disabled building manual tests with CMake for now, because qmake doesn't do it, and it confuses people. Done-With: Alexandru Croitor <alexandru.croitor@qt.io> Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
| * testlib: Move subtest argument handling to individual testsTor Arne Vestbø2020-02-061-11/+12
| | | | | | | | | | | | | | | | The test orchestrator shouldn't have to deal with the individual options needed for each test. Change-Id: I78bbf4850cc649e625bd08a7aedf02267ba1314d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Regenerate tests/auto/testlibAlexandru Croitor2019-11-132-14/+0
| | | | | | | | | | | | Change-Id: If1b2e105836b73b1a68ed5a8e11feb8e114d66e2 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Include the .prev_CMakeLists.txt files for selftestsAlexandru Croitor2019-06-041-0/+22
| | | | | | | | | | | | | | | | | | | | This will help with future regeneration. Amends 6d1c695b0e32b644d13a088ab3363b6aef75de68 Change-Id: I2454dc36cfc00f7aad72488fb7927d7807978fd8 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | cmake: Fix testlib/selftestsAlbert Astals Cid2019-06-041-1/+24
| | | | | | | | | | | | | | | | | | | | Actually build tst_selftest Fix the subdirs of it not to be actually built as tests (so that ctest doesn't pick them up and tries to run them) Change-Id: Id9d069f44241027dbd103884d36551163382b216 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* | Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-161-0/+2
|\| | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
| * Add a feature to enable CodeCoverage analysis of testlibEdward Welbourne2019-01-241-0/+2
| | | | | | | | | | | | | | | | | | | | Based on Asmo Saarela's advice (QTPM-686), adapted on advice from FrogLogic support and converted to a feature so that the selftest and testlib qmake config can be co-ordinated. Task-number: QTPM-1385 Change-Id: Icd706f086009e1e08b3f8c5cd553f792402e28c0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Begin port of qtbase to CMakeSimon Hausmann2018-11-011-0/+1
|/ | | | | | | | | | | | | | | Done-by: Alexandru Croitor <alexandru.croitor@qt.io> Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-by: Kevin Funk <kevin.funk@kdab.com> Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Done-by: Simon Hausmann <simon.hausmann@qt.io> Done-by: Tobias Hunger <tobias.hunger@qt.io> Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-by: Volker Krause <volker.krause@kdab.com> Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
* Updated license headersJani Heikkinen2016-01-211-17/+12
| | | | | | | | | | | | | 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>
* 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>
* 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>
* QtTest tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0Debao Zhang2013-03-271-1/+0
| | | | | Change-Id: Id67ab0ea3be47d3b365aa01a354829b8745b7250 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.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>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-011-0/+1
| | | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Provide public API for native event filtering, moved up from QPA.David Faure2012-07-201-3/+3
| | | | | | | | | | | | | | | | | | The previous API was hard to use (global function, no type safety, manual chaining), and confusing (app vs dispatcher split only made sense on Windows). Installing and removing out of order would have the risk of setting back a dangling pointer (crash). Meanwhile QPA added type safety, and this new API models the QObject::installEventFilter API for ease of use. The virtual method is in a new interface, QAbstractNativeEventFilter. QPA was even calling the dispatcher event filter with QPA-private event classes, which made no sense (refactoring leftover from when the code was in the dispatcher). Now the QPA plugins trigger the qcoreapp event filters with the actual native events directly. Change-Id: Ie35e47c59c862383bcaf857b28d54f7c72547882 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Make the event notification on Windows be mandatory in all dispatchersThiago Macieira2012-05-041-0/+5
| | | | | | | | | | | | | This way, QWinEventNotifier will work on all Windows systems, not just with the default event dispatcher. Other dispatchers (other than QWin32EventDispatcher) are permitted, so the class should not abort just because of that. If a dispatcher really doesn't want to implement this, they need to implement the virtuals to do nothing, possibly print a warning. Change-Id: I2c132bcde95b9d5941c8906a0fcd2ad964087772 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Add a remainingTime() method to the public interface of the QTimer classLaszlo Papp2012-04-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It is an extension coming from the use case when you, for instance, need to implement a countdown timer in client codes, and manually maintain a dedicated variable for counting down with the help of yet another Timer. There might be other use cases as well. The returned value is meant to be in milliseconds, as the method documentation says, since it is reasonable, and consistent with the rest (ie. the interval accessor). The elapsed time is already being tracked inside the event dispatcher, thus the effort is only exposing that for all platforms supported according to the desired timer identifier, and propagating up to the QTimer public API. It is done by using the QTimerInfoList class in the glib and unix dispatchers, and the WinTimeInfo struct for the windows dispatcher. It might be a good idea to to establish a QWinTimerInfo (qtimerinfo_win{_p.h,cpp}) in the future for resembling the interface for windows with the glib/unix management so that it would be consistent. That would mean abstracting out a base class (~interface) for the timer info classes. Something like that QAbstractTimerInfo. Test: Build test only on (Arch)Linux, Windows and Mac. I have also run the unit tests and they passed as well. Change-Id: Ie37b3aff909313ebc92e511e27d029abb070f110 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.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>
* Changed selftests unittest to work from installation directory.Kurt Korbatits2012-01-111-5/+0
| | | | | | | | | | - All subprograms installed as part of test instead of separate installs - Added installTestHelperApp() to testcase.prf Change-Id: I02fbbb299f095054c9216ad0e5f91f574fb0fe3d Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Changed selftests unittest to use specific headers instead of QtCore.Kurt Korbatits2012-01-101-1/+1
| | | | | | | | | | | Changed selftests unittest to use specific classes of QtCore instead of pulling in all of QtCore headers by using include <QtCore> - Decreasing build time. Change-Id: Ic53a70423ecafeb342cc05ae6d7dee795533d205 Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@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>
* Add Qt::TimerType argument to QAbstractEventDispatcher::registerTimer()Bradley T. Hughes2012-01-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | ... and deprecate the old registerTimer() functions. The new pure- virtual registerTimer() breaks source-compatibility. Subclasses cannot be instantiated anymore, since the pure virtual function signature has changed. QAbstractEventDispatcher::TimerInfo is no longer a QPair. It is now a struct with timerId, interval, and timerType members. This is a source incompatibility that should only affect subclasses of QAbstractEventDispatcher, which will need to pass 3 arguments to the TimerInfo constructor instead of 2. If the subclass used QPair<int,int> instead of the TimerInfo typedef, the QPair<int,int> declarations will need to be replaced with TimerInfo. Call the new registerTimer() function with the type from QObject::startTimer(). Change all subclasses of QAbstractEventDispatcher to reimplement the new virtual function. The type argument is unused at the momemnt, except to ensure that registeredTimers() returns the type each timer was registered with. Implementations for the various dispatchers will be done in separate commits. Author: Thiago Macieira <thiago.macieira@nokia.com> Change-Id: Ia22697e0ab0847810c5d162ef473e0e5a17a904b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix testlib selftests on shadow build.Kurt Korbatits2011-12-141-1/+5
| | | | | | | | Changed to use QT_INSTALL_TESTS to install subtests. Change-Id: I4a2a7bd2d3e7d6da34dbb922bf377bee98cdedb0 Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* all remaining tests: eliminated usage of qttest_p4.prfRohan McGovern2011-10-251-6/+1
| | | | | | | | | qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4. It enables various crufty undocumented magic, of dubious value. Stop using it, and explicitly enable the things from it which we want. Change-Id: I02fe27b2c1800f929250fa8694ca2976c9661a12 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Moved autotests in category 'testlib' into new directory structureJo Asplin2011-09-122-0/+143
Task-number: QTBUG-21353 Change-Id: I2e2ad4b7570f80b3e6500821f769e967f0a75027 Reviewed-on: http://codereview.qt-project.org/4438 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>