aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest/quicktest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Split CompiledData::CompilationUnit in twoUlf Hermann2019-05-161-3/+8
| | | | | | | | We need a CompilationUnit that only holds the data needed for compilation and another one that is executable by the runtime. Change-Id: I704d859ba028576a18460f5e3a59f210f64535d3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-251-5/+7
|\ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qmltest/quicktest.cpp tests/auto/qml/qmlcachegen/qmlcachegen.pro Change-Id: I70e96e8817d59647f876b8b77b30cdeede8f0662
| * Don't warn if invokable test setup function doesn't existMitch Curtis2019-03-211-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was never the intention (as the code comments imply), but it was never tested. This is a cherry-pick of 50f234df500829a0023ed5d396c486f995ad71ef because it went to dev (5.13) when it should have originally went to 5.12. Change-Id: I8df0b3702129b1f1d086df73117d3ddb721317cb Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> (cherry picked from commit 50f234df500829a0023ed5d396c486f995ad71ef) Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * QUICK_TEST_MAIN_WITH_SETUP: fix qmlEngineAvailable() being called too lateMitch Curtis2019-03-211-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I added the macro, I wasn't aware that TestCaseCollector was a thing. TestCaseCollector loads each QML file without running the tests (i.e. creates a QQmlComponent from the file without creating an object from that component). Since it still executes imports, the test can fail if types are registered or import paths added in qmlEngineAvailable(), since it's called too late. So, call it earlier. This should have no adverse effect on user code, as nothing of importance to the user will be skipped, and the documentation already details what can be expected by the time qmlEngineAvailable() is called. Change-Id: Ibd3a4b728bc87b90f89cc310fddf668c5879ad83 Fixes: QTBUG-74160 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-141-1/+5
|\| | | | | | | Change-Id: I2842f4a8096c4555e29f08e65b88b77b841441cb
| * Defer QML testing until event loop has startedTor Arne Vestbø2019-02-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Executing the event loop means we get various things set up properly, such as runloop auto-release pools on macOS. If not, the whole test suite will be run as a result of the setWindowShown call. Change-Id: Ie217d803208134c5be7db0ee04fbfab86702b521 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-101-1/+1
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I6b2539bf17d3e9bc66d96b53c1bce95680113ed8
| * quicktest: winrt: Use qml files from resource system by defaultOliver Wolff2019-01-101-1/+1
| | | | | | | | | | | | | | | | Similar to how it is done for Android, winrt should use qml files from qrc by default. Change-Id: I4cd0def2467f764155302fccc393c355907be744 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Doc: Fix Qt Quick Test documentationMitch Curtis2018-12-141-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add qtquicktest-cppapi.qdoc for the C++ API landing page. - Add qtquicktest.qdoc for the QQuickTest namespace. - Add qtquicktest-qmltypes.qdoc for the QML types landing page. - Add ../../imports/testlib to the sourcedirs variable so that the QML files can be found. - Add a "Reference" section to qtquicktest-index.qdoc that has links to the QML and C++ pages. - Add more targets so that we can reliably link to them while keeping the nice short section names. - Fix minor issues in existing documentation. - Link to the QML API docs from the C++ API docs. Change-Id: I5fc3c90105b095d9ea84c3f76e6c7ba0a47c2695 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Don't warn if invokable test setup function doesn't existMitch Curtis2018-12-101-13/+21
| | | | | | | | | | | | | | | | This was never the intention (as the code comments imply), but it was never tested. Change-Id: I8df0b3702129b1f1d086df73117d3ddb721317cb Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Doc: fix \relates command for qIsPolishScheduled()Mitch Curtis2018-12-071-1/+1
| | | | | | | | | | | | Change-Id: Ifa59cae9fd682e9884b40cd0be0da59f5e725ffd Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Doc: explain why QQuickTest::qIsPolishScheduled() is usefulMitch Curtis2018-10-311-0/+18
| | | | | | | | | | Change-Id: I2df4b18b46f9b532e956a64e4be656a338de7a22 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Add QQuickTest::qWaitForItemPolished()Mitch Curtis2018-10-311-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Verifying that an item was polished is quite common in Qt's auto tests: - The Qt Quick auto tests have a util function for it in visualtestutil.h (line 103). - "git grep polishScheduled -- tests/auto | wc -l" says that there are 269 usages of polishScheduled in Qt Quick auto tests, almost all of which look like this: QTRY_COMPARE(QQuickItemPrivate::get(item)->polishScheduled, false); - QQuickTableView's auto tests have their own function: #define WAIT_UNTIL_POLISHED \ QVERIFY(tableViewPrivate->polishScheduled); \ QTRY_VERIFY(!tableViewPrivate->polishScheduled) - More recently, QQuickMenu started requiring it (see menuutil.h). QQuickItem::polish() and QQuickItem::updatePolish() are both public functions, so the notion of polishing in Qt Quick is not new or hidden. This means that any user applications that have custom items that make use of the polish() => updatePolish() system will benefit from having a reliable method of testing their behavior. In addition, anyone wanting to simulate interaction with items in e.g. QQuickMenu will need this API if they don't want to use unreliable qWait() calls. With this in mind, this and the previous patch aim to standardise/ simplify the various private API checks and utility functions, and provide public API for users so that they can benefit from more reliable tests. When used together, the code will look like this: QVERIFY(QQuickTest::qIsPolishScheduled(item)); QVERIFY(QQuickTest::qWaitForItemPolished(item)); [ChangeLog][QtQuickTest][QQuickTest] Added QQuickTest::qWaitForItemPolished() for verifying that updatePolish() was called on an item. Fixes: QTBUG-71224 Change-Id: I8841910212e7f1a431ba845cae8a1ba7b4f4da67 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Add QQuickTest::qIsPolishScheduled()Mitch Curtis2018-10-311-0/+18
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Verifying that an item was polished is quite common in Qt's auto tests: - The Qt Quick auto tests have a util function for it in visualtestutil.h (line 103). - "git grep polishScheduled -- tests/auto | wc -l" says that there are 269 usages of polishScheduled in Qt Quick auto tests, almost all of which look like this: QTRY_COMPARE(QQuickItemPrivate::get(item)->polishScheduled, false); - QQuickTableView's auto tests have their own function: #define WAIT_UNTIL_POLISHED \ QVERIFY(tableViewPrivate->polishScheduled); \ QTRY_VERIFY(!tableViewPrivate->polishScheduled) - More recently, QQuickMenu started requiring it (see menuutil.h). QQuickItem::polish() and QQuickItem::updatePolish() are both public functions, so the notion of polishing in Qt Quick is not new or hidden. This means that any user applications that have custom items that make use of the polish() => updatePolish() system will benefit from having a reliable method of testing their behavior. In addition, anyone wanting to simulate interaction with items in e.g. QQuickMenu will need this API if they don't want to use unreliable qWait() calls. With this in mind, this and the follow-up patch aim to standardise/ simplify the various private API checks and utility functions, and provide public API for users so that they can benefit from more reliable tests. When used together, the code will look like this: QVERIFY(QQuickTest::qIsPolishScheduled(item)); QVERIFY(QQuickTest::qWaitForItemPolished(item)); The follow up patch adds auto tests. [ChangeLog][QtQuickTest][QQuickTest] Added qIsPolishScheduled() function to allow checking if updatePolish() has been called on an item since the last call to its polish() function. This is useful to verify that a polish has been scheduled. Task-number: QTBUG-71224 Change-Id: I856a40321945c0070e4679e11e4812e0d7adc1f9 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add test cleanup function for C++ partsRainer Keller2018-09-241-0/+5
| | | | | | | | | | | | | | | | | | | | This allows to do cleanup in C++ before other parts being destructed. It QtOpcUa we need to destruct a subprocess. Until now it was done in the destructor of the setup class. When the destructor is called the eventloop already died but the process is still sending output when being terminated. In the windows event handling a nullptr is being dereferenced in this case, see QTBUG-70641. When terminating this process somewhat earlier, when the eventloop is still available, the event dispatcher is able to handle those events without crashing. Another reason to have this function is because there is applicationAvailable() being called to initialize C++ code and there should be an equivalent function for cleaning up. [ChangeLog][QtQml][QtTest] Add cleanupTestCase() to be called before starting destruction Change-Id: I24f7a51ec5276a449892609f5b2cfe7957c27668 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Encapsulate access to CompiledData::Object and CompiledData::ImportSimon Hausmann2018-07-311-2/+2
| | | | | | | | This will make it easier to move the data out of CompiledData::Unit and into a separate data structure. Change-Id: I32e6233a66f2279b44cc06ef7c3505db4a565f98 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Encapsulate the unit data in CompilationUnitSimon Hausmann2018-07-311-2/+2
| | | | | | | | This allows updating the constants table when the unit data is set / changes and removes the tie to the engine. Change-Id: Ice553650390589e30e18421c4e55422a55d0df89 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add test init function for C++ partsRainer Keller2018-06-251-0/+5
| | | | | | | | | | | | This allows to start other processes as counterparts using QProcess. In the constructor of the setup class it is not possible because no QApplication object has been instantiated yet. [ChangeLog][QtQml] Add test init function to be called when application object is available. Change-Id: Id24395eca41921c743062522a4aeb6231f9bdf09 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Exit test executable with failure if specified test functions are not foundKari Oikarinen2018-06-211-3/+14
| | | | | | | | | | | | | | | | | | | | | | If QtQuickTest test executable was given filters that didn't match in any of the qml files run, it exited successfully. In combination with a Coin bug when the test function name contains a space, this allowed failing tests to pass the CI. If the test function fails, the repeat attempts would pass two arguments to the executable. Neither of those hit, but that wasn't considered a problem. Check that all of the test functions named on the command line are actually executed during the whole run and otherwise exit with a non-zero exit code. I assume there's no duplicates in the whole names of test functions scoped with testcase names. Task-number: QTBUG-68197 Change-Id: Icf7fe263945403f02920522dfd187aeb76b7cb3c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kalle Viironen <kalle.viironen@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-151-2/+6
|\ | | | | | | | | | | | | Conflicts: src/qml/qml/qqmltypeloader.cpp Change-Id: If9874faf23e813b05ee4cf042133a528d73ba72a
| * Fix TestCaseCollector fails to initialize component from resourcesChristoph Keller2018-05-131-2/+6
| | | | | | | | | | | | Change-Id: I9f1e20653776bbdf1a8a41a631636ec61ddd08b6 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Clean up manual reference of QQmlTypeData and QQmlPropertyCacheSimon Hausmann2018-04-261-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | | We have a few places in the type loader where we do adventurous manual reference counting, where getType() returns a raw pointer that has been addref()'ed and then sometimes somehow we call release() later. Commit 0b394e30bba4f6bb7e6f7dbe5585a2e15aa0f21d is an example of where this can easily go wrong. As a consequence and also in preparation for future work on the type loader, this patch starts replacing the manual reference counting there. Changing the return type from QQmlTypeData *getType() to a QQmlRefPointer<> itself is not sufficient though, as the implicit operator T*() will still allow the caller to store the result as a raw pointer. Therefore this patch removes the "unsafe" implicit extraction operator. As a result of that change, other types that are sometimes stored in QQmlRefPointer are also affected and their usage needs to be adapted to QQmlRefPointer usage or manual raw pointer extraction with .data(). Change-Id: I18fd40634047f13196a237f4e6766cbef3bfbea2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-4/+4
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add QUICK_TEST_MAIN_WITH_SETUP to allow executing C++ before a QML testMitch Curtis2018-02-021-0/+13
| | | | | | | | | | | | | | | | | | | This macro is the same as QUICK_TEST_MAIN, but takes the user's QObject subclass as an argument, and calls pre-defined slots/invokable functions on it, similar to how e.g. init() is called for C++ tests. This allows e.g. context properties to be set for the QML tests. By basing the API on invokable functions, we give ourselves the freedom to easily add more functions in the future. [ChangeLog][QtQuickTest] Added QUICK_TEST_MAIN_WITH_SETUP macro to allow executing C++ before a QML test (such as registering context properties). Task-number: QTBUG-50064 Change-Id: Id566e388553811c220871248403d32545f8ae1eb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Allow adding file selectors for QUICK_TEST_MAIN testsJan Murawski2017-12-051-0/+11
| | | | | | | | | | This patch allows adding file selectors for QUICK_TEST_MAIN tests via the command line switch "-file-selector". Adding such a selector allows the test of platform specific QML components. E.g. one can test an Android component on Linux. Change-Id: I556ad7211ed4a0881150686270a9a4e69f68d1ee Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-09-201-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4compileddata.cpp src/qml/compiler/qv4compileddata_p.h src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4qmlcontext.cpp src/qml/jsruntime/qv4qmlcontext_p.h src/qml/jsruntime/qv4regexpobject.cpp src/qml/jsruntime/qv4regexpobject_p.h src/qml/types/qqmllistmodel.cpp src/quick/items/qquickanimatedimage_p.h src/quick/scenegraph/qsgrenderloop.cpp tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp Change-Id: If20ef62b2c98bdf656cb2f5d27b1897b754d3dc0
* | QuickTest: initialize import and plugin paths before TestCaseCollectorJ-P Nurmi2017-09-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | 215c0145 broke QQC1 auto tests. The problem seems to be that TestCaseCollector created a QQmlComponent instance before the import and plugin paths were set. Later on, when running the actual tests, a cached component was used and the paths were missing. Task-number: QTBUG-63220 Change-Id: Ifec163899db9ea088fdabc179181cc150534fc4d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | qmltest: Enumerate test cases / functions without evaluating QMLTor Arne Vestbø2017-09-131-3/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most, if not all, QML tests are written without any sort of dynamic instantiation of the test data, so doing view.setSource() will evaluate the whole source file, compute bindings, create items, windows, etc. This is less then ideal when all you want is to list the test functions using -functions, or when running a single test from the command line, as in both cases we'll still actually evaluate every single QML file. This makes it really hard to evaluate test output, e.g. from the CI, especially with logging enabled, as even if a single test is requested, the logs are filled with results from the loading of the other tests. To improve the situation we use a non-instantiated QML component that we then inspect its compilation data, looking for test cases and functions. In the future the implementation of TestCase's qtest_run* machinery should be built on top of QTestLib instead of being reimplemented in JavaScript, but this is left for later. Change-Id: Ie5448208daf786e335583ab6bdfbc195891ec1f5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | qmltest: Run each test in a separate QQuickView for test isolationTor Arne Vestbø2017-09-051-34/+34
|/ | | | | | | | | | | | | We don't want the individual tests to affect each other by what state they leave the QQuickView (and corresponding QWindow and platform window) in when they finish. Task-number: QTBUG-62963 Change-Id: I90ad2364c8e9b769afc61eb762c4a604a567a856 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix finding test data on AndroidEskil Abrahamsen Blomfeldt2017-08-221-0/+5
| | | | | | | | | | | | | The standard way of doing Qt Quick testing requires having qml files available in the deployment somewhere in the regular file system. This is not how Android works, where all test data should be deployed as resources. To allow this, we simply hardcode the test path as a resource path on Android instead of checking on the disk. Task-number: QTBUG-45576 Change-Id: I0729f5004a6206d2a10b782eb5b7d83a833c4f51 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* quicktest: Don't warn if the root item has no sizeRobin Burchell2016-12-221-3/+0
| | | | | | | | | | | | It could be argued that all callers should be fixed, but this warning has existed since 2012 and even our own tests do not all set sizes, so I think that battle is a lost fight. This helps make real problems with the tests more visible. Change-Id: Ie29521695ef11943154dae40726d194dc72316c2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-1/+1
| | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QmlTest: replace 'foreach' with 'range for'Anton Kudryavtsev2016-08-111-6/+7
| | | | | | | | And add QT_NO_FOREACH define to .pro file. Now QmlTest is 'foreach' free. Change-Id: I17d8563cafd34bb90fe455ae955da5c56fbd2899 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Use QStringRef to optimize memory allocationAnton Kudryavtsev2016-04-261-1/+1
| | | | | | | | | | | | | | | | | Replace substring functions that return QString with corresponding functions that return QStringRef where it's possible. Create QString from QStringRef only where necessary. While touching the code, also port loops to C++11 style. Change-Id: I04c99b24ea6afd3715e3edf9ea00bfab838fd53c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-121-1/+1
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I356ec83cf687bd2833f9a7c5e820d56b1efa8979
| * QuickTest, QmlImportScanner: replace QStringLiteral with QLatin1StringAnton Kudryavtsev2016-02-101-1/+1
| | | | | | | | | | | | | | ... in string comparisons. It's more efficient. Change-Id: Ia157618cf870870f24c4a2962a385962da819275 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-191-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: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Indicate that QuickTestLib is runningLaszlo Agocs2015-09-091-0/+2
| | | | | | | | | QTestLib already sets this environment variable to indicate that the code is running on a test environment. Do the same for QuickTest too. Change-Id: I597237fcd16dc568b750bdef325881e808c407eb Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-311-6/+16
|\ | | | | | | Change-Id: I54e66e992f5e5d441b8b5394e7a03ec5352e7bf3
| * Improved QML test robustness and logging.Jason Erb2015-03-301-6/+16
| | | | | | | | | | | | | | | | Added logging to quick_test_main and reordered for robustness (e.g. moved "wait for load" to before error check). Change-Id: Ifd48b5bdd1efee4301e5c4e571241762dca176ad Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-0/+4
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf LICENSE.GPLv2 examples/qml/networkaccessmanagerfactory/view.qml src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4stringobject.cpp Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32
| * qquicktest: Wait for the view to finish loadingDaiwei Li2015-02-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | Tests can be skipped if the view is still loading by the time we get to the end of the loop. There is a case where the window is active but the QML hasn't been loaded. Change-Id: I4e8346ee547653810458d042925d673748c1fec8 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-121-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. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* | Add -plugins argument to qmltestrunner to specify plugins search pathAlain Martin2014-12-171-0/+7
|/ | | | | | | Allow users to specify locations of compiled QML plugins. Change-Id: I66059dc7b1314ca6fbef87032b16ccf3caf8bd30 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* QtQuick test: Do not complain about Qt specific argumentsKai Koehne2014-04-031-17/+23
| | | | | | | | | | | | | | | Commit 1ca5e82cccae0 caused a regression for Qt arguments like -qmlsjsdebugger=xxx . These are automatically removed from argv by QCoreApplication, but since we copied argv before instantiating QCoreApplication this didn't have any effect. Fix this by moving Q[Core]Application instantiation again before the parsing and copying of testlib-specific arguments. Task-number: QTBUG-37793 Change-Id: Ief41640b6cf3251f700a5d24d2e1141233a3888f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* QML testlib: Do not modify the arguments passed into QGuiApplication.Friedemann Kleint2014-03-071-8/+6
| | | | | | | | | argc/argv passed into QGuiApplication must match those of main on Windows due to the special command line parsing. Task-number: QTBUG-36466 Change-Id: Id722692d2bdc18a6627fdaeffb349b78137ae314 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Make sure the test window has focusAlbert Astals Cid2014-01-161-1/+2
| | | | | | | | | | | Some setups like xvfb-run under Linux do not focus windows after showing them, this means that any focus based test will fail since the windows itself is unfocused. This makes sure the test window will be shown and focused. Change-Id: I1903b7cdf88b772e1ca15acd4899695b49615712 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* qmltest: Add QTestDefinedVariablesCaroline Chao2013-08-281-1/+10
| | | | | | | | | | | QTestDefinedVariables is used by the QTestRootObject to check is a preprocessor variable is defined. Adding QT_OPENGL_ES_2_ANGLE. It can be useful to know if it is defined (Win32 + Angle) while running a test. Change-Id: I2f9ffb1028c94095c711ab64737b53b60c055312 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* qmltest: Register test object as a singletonCaroline Chao2013-08-281-9/+26
| | | | | | Change-Id: I5f6c404ff2901082f22b953b29aed08d3488f31d Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>