summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools
Commit message (Collapse)AuthorAgeFilesLines
* qmake-test: Fix jom/nmake handling on Windows.Friedemann Kleint2012-03-011-2/+23
| | | | | | | | | The test fails if MAKEFLAGS is set up for jom since the test always uses nmake. Remove MAKEFLAGS from the process environment. Change-Id: Idaed3cc964832b83c282a59fc5257572c520b882 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* remove useless init() functionOswald Buddenhagen2012-02-271-6/+0
| | | | | | | | it did the same cleanup() did, and they are always called consecutively anyway (except at start and end where it does not matter). Change-Id: I4c82024d19d6c670f1f4037d43147a15680614ae Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* move resetEnvironment() call to cleanup()Oswald Buddenhagen2012-02-271-1/+1
| | | | | | | we want to call it even if the test fails Change-Id: Ie8f3f9d2df5d52990d6b9f9a632e49826278175a Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* make qmake test suite a tad more verbose on failureOswald Buddenhagen2012-02-273-13/+19
| | | | | | | automatically dump the collected output on non-expected return code Change-Id: Ifda7287869f329c5a6714e6f21aa9c3991e9ee4e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* TestCompiler: split commands from argumentsOswald Buddenhagen2012-02-273-11/+27
| | | | | | | | | this allows us to temporarily set some extra args without (incorrectly) instantiating a second TestCompiler (and on the way relying on $PATH for finding qmake). Change-Id: Icce5bf7314148ddbe705606f77a26e3362b31f67 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* don't rely on $PATH for finding rccOswald Buddenhagen2012-02-271-1/+3
| | | | | Change-Id: I7e6ffad6d84cca0b548920b3e620375fb5e314e9 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* clean up qmake-generated projectsOswald Buddenhagen2012-02-243-16/+0
| | | | | | | | remove "header" and assignmets which are defaults or bogus, reorder some assignments. Change-Id: I67403872168c890ca3b696753ceb01c605d19be7 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* uic: use QStringLiteral() instead of QString::fromUtf8() where applicableMarc Mutz2012-02-2099-1500/+1500
| | | | | | | | | | | | | | | | | | | | | | | Many (most?) strings written aren't in fact UTF-8, and we can check at compile-time which are and which aren't, so don't hard-code fromUtf8() but use the much more efficient QStringLiteral() where applicable. This is low-hanging fruit. This patch only optimises US-ASCII string literals, not those that are latin-1 or even UTF-8, because that would require more extensive changes to the original fixString() function. Likewise, there are also other calls to QString::fromUtf8() being generated (e.g. in the pixmap code) that could benefit from being turned into QStringLiterals, but their code paths are more involved than those this patch fixes. This patch at least suffices in turning all the setObjectName() arguments into QStringLiterals, which was the main goal. The autotest baseline has been updated with the new expected results. Change-Id: Ic1ef67f500f9ff92d36164d515f4e004ef2a10bc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Eliminate duplicate data row names in dbus, tools and xml autotests.Jason McDonald2012-02-161-3/+3
| | | | | Change-Id: Ic734435f57bb4f2160ecb3bc645e642207931a99 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Implement QMAKE_SUBSTITUTES.config = verbatim.Stephen Kelly2012-02-113-1/+15
| | | | | Change-Id: Ie0b333fa7fae2283e99e42f9cd7bab4e84991f40 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Force -fPIE on ELF if Qt is built with reduced relocationsOlivier Goffart2012-02-101-2/+2
| | | | | | | | | | | | | | | | Put in qconfig.h whether qt is compiled with reduced relocations. When using -Bsymbolic-functions (enabled by default on Qt) but not -fPIE, the comparison of the function pointers fail because the addresses are different in Qt, and in the executable. Hence we now enable -fPIE by default on qmake, and force a compilation error when it is not enabled and built with reduced relocations. Done-with: Sune Vuorela <sune@vuorela.dk> Change-Id: Ib3fdba06fab6e8a93b75b4c6cf16cc973ab335db Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-30145-145/+145
| | | | | | | | | | 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-23145-145/+145
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-05144-144/+144
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Changed tests: qmake,selftest and lancelot to use QFINDTESTDATA.Kurt Korbatits2012-01-051-2/+7
| | | | | | | | | | Changed these tests to use QFINDTESTDATA macro to detect location of testdata. Checking for a specific file contained in the testdata so as not to be confused by empty directories created during configure. Change-Id: Iac2ac6304b6b9ac79e00886025b93ec0af5a8507 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Revert "Revert "Add QObject::objectNameChanged(con... signal""Alan Alpert2011-12-201-14/+14
| | | | | | | | | This reverts commit 9b17557f3bbd5135651bcedf9f10e61d7e078ae2. Justification: Temporary commit, see JIRA task. Task-number: QTBUG-22985 Change-Id: I3df9eb5fdbdc133349dca5e192dcfcc9e758626c Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix qimagereader, qmovie and qmake unittest to work in shadow build.Kurt Korbatits2011-12-152-11/+13
| | | | | | | Changed to use QFINDTESTDATA and TESTDATA. Change-Id: I8684bc191cf8ffb8b531456e32047d582ebc018c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Revert "Add QObject::objectNameChanged(const QString &objectName) signal"Martin Jones2011-12-021-14/+14
| | | | | | | | | | | This reverts commit ba635d7e74472f3a54c0c4686966af46d9035c6f. Breaks tests in declarative: tst_qdeclarativeecmascript::deleteLater tst_qquickvisualdatamodel::objectListModel Change-Id: I467b45109332e66fc62f3de00f376b1b88ab19ca Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Add QObject::objectNameChanged(const QString &objectName) signalBradley T. Hughes2011-12-011-14/+14
| | | | | | | | | | | | | | | | | | | This is sent when the object's name changes. tst_moc must be updated since the method count of QObject has changed. The test assumed that there were 4 invokable methods in QObject. The new signal is the 5th, which breaks the test's assumptions. Fix this as well. tst_QObject must be updated since the QObjectPrivate::isSignalConnected() method only supports the first 64 signals. With the addition of this new signal, sig61() in the test becomes the 65th signal, and will always appear connected now. Task-number: QTBUG-13999 (related) Change-Id: Ie87893c71a231fafa7ccf2f16102238a7be8327a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add support to moc for registering non-local enums via Q_ENUMS.Glenn Watson2011-11-271-0/+38
| | | | | | | | | | | | | | | | When using the Q_ENUMS macro to register an enumeration in a class with moc, it's now possible to provide a scoped enumeration that exists in another class. This adds the enum class scope to a metaobject's list of related classes stored in the extradata field. This allows the declarative code to handle non-local enums in signal and slot functions that are exposed to QML. Task-number: QTBUG-20639 Change-Id: I94f5292818095fda75762bd1508ba5c69de19503 Reviewed-by: Martin Jones <martin.jones@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Don't depend on moc to disable test functions.Jason McDonald2011-11-181-56/+77
| | | | | | | | | | | | | | | | | | | | | The moc tool is not aware of all defines (particularly those that are compiler builtins) and does not correctly evaluate others that depend on compiler builtins, such as Q_OS_FOO. This commit reverts parts of the following commits, but is not a complete fix as there were many instances of this problem in the tests prior to those commits: 924d810dbdcd5b5b0fa860922b2487ea9062d002 8aaff6751038b88d17e23be6fcee945771297c5b 338d3f11973412047c2c9cd41cbd0c961d738ef3 a55034062ba2bf73a9f1ed3d9cf31745b38149e3 253497b7446c7d723aa3bdd7152e25d6852f2604 7cfad460c56319ba89c4a3a0bbcb2e54ab1cdbc6 9d2ff58f3642828e494e7e9b2df7dbb8e2cd408f 0cf6baa2d61ebaad2a2a0530c37f27e719b68f4b Change-Id: I947d797fe3ec76139ba1b55561cea569895662c5 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* moc: fix Q_INVOKABLE returning referencesOlivier Goffart2011-11-151-0/+16
| | | | | | | | | | | | | | | | | | | The moc generated code would not compile otherwise Keep Moc::parseFunction and Moc::parseMaybeFunction in sync (the first is used for signals and slots, and the second for normal functions such as Q_INVOKABLE) Last patch that introduced function pointer updated parseFunction but not parseMaybeFunction When a slot return a reference, moc generate code that make the MetaObject system think it is a void, so qt_metacall and invokeMethod do not mess with the return value. But when we want to take the function signature, in the IndexOfMethod call, we need to have the exact return type. Change-Id: I4661218d7ce367ad3934e73929e7d04f0a6dbc09 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix parsing of #if defined expressionOlivier Goffart2011-11-111-1/+22
| | | | | | | | | We only need to match the closing parentheses if there was an opening one This has caused mis-parsing of tst_qbytearray.cpp Change-Id: I9d52916e3ed8549c5ddd968092451fef7389a952 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* moc: support c++11 style enumsOlivier Goffart2011-10-293-2/+103
| | | | | | | Task-number: QTBUG-21480 Change-Id: Ic116a5a06dd68036823f27146e49511c68cf2de6 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Remove unreachable QSKIP in UIC autotest.Jason McDonald2011-10-271-8/+1
| | | | | | | | | If an autotest's initTestCase() method fails or skips, the remaining test functions are not executed. Thus the QSKIP in the run() test function was unreachable. Change-Id: If1f1b484958367236357f9445491bed50bee2239 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete MSVC workarounds from autotests.Jason McDonald2011-10-271-12/+0
| | | | | | | | Qt5 doesn't support MSVC versions before 2008, so workarounds for earlier versions are no longer required. Change-Id: I429feff99fe61d286637b960d92fd58962f8aefa Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* all remaining tests: eliminated usage of qttest_p4.prfRohan McGovern2011-10-254-9/+10
| | | | | | | | | 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>
* Remove SkipMode parameter from QSKIP calls.Jason McDonald2011-10-211-1/+1
| | | | | | | | | The previous commit removed SkipMode from the testlib APi. This commit removes the parameter from all calls to QSKIP. Task-number: QTBUG-21851, QTBUG-21652 Change-Id: I21c0ee6731c1bc6ac6d962590d9b31d7459dfbc5 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove redundant logic from tools autotests.Jason McDonald2011-10-172-11/+0
| | | | | | | | The tools tests are not built for cross-compiled Qt builds, so the logic to make those tests empty when cross-compiled is redundant. Change-Id: Ia3a3a680d7ade2cee78aa633b41c9ef5be6f2f15 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Avoid using QSKIP in lieu of compile-time checksJason McDonald2011-10-051-87/+62
| | | | | | | | | | | | | | | | QSKIP is intended to be used to skip test functions that are found at run-time to be inapplicable or unsafe. If a test function can be determined to be inapplicable at compile-time, the entire test function should be omitted instead of replacing the body of the test function with a QSKIP, which only serves to slow down test runs and to inflate test run-rates with empty, inapplicable tests. Task-number: QTQAINFRA-278 Change-Id: I582732e3dd657df834f9a98fd52d7ee368f2f29b Reviewed-on: http://codereview.qt-project.org/5946 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* test: Re-enabled `tst_moc' test that is now passing on LinuxSergio Ahumada2011-10-031-2/+0
| | | | | | | | | | This test was fixed by 1cc70b92c8c838a013b45af6814ea6532245067a Change-Id: If6fa3724f7c31e952ebff1dd27fea1a1e4635a85 Reviewed-on: http://codereview.qt-project.org/5783 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
* Fix moc autotestLars Knoll2011-09-292-2/+2
| | | | | | | | | | QWidget is not in QtGui anymore, this broke the test. Simply use QWindow instead. Change-Id: Ic0176410f08b10771b663aa3ecd70295c124b662 Reviewed-on: http://codereview.qt-project.org/5757 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Re-enabled test and made it pass on LinuxJo Asplin2011-09-23100-1216/+1214
| | | | | | | | | | Task-number: QTBUG-21424 Change-Id: Ie63380f22d299708b2085652389869cac841e249 Reviewed-on: http://codereview.qt-project.org/5388 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com> Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
* Re-enabled test and made it pass on LinuxJo Asplin2011-09-238-15/+13
| | | | | | | | | | Task-number: QTBUG-21402 Change-Id: I54226c0aa63c70f9bb8ed8be3784918dd70e5592 Reviewed-on: http://codereview.qt-project.org/5382 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com> Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
* Fix autotest gui/widgets dependenciesKent Hansen2011-09-193-0/+3
| | | | | | | | | | | | | | | | | This is in preparation of removing testlib's dependency on QtGui and QtWidgets. Autotests that need QtWidgets api must explicitly include it (since the types are no longer provided by the QtGui master header). Autotests that don't need QtGui or QtWidgets api shouldn't link against those libraries. Change-Id: I2808289068514fcac582808828ad4634e2631733 Reviewed-on: http://codereview.qt-project.org/5093 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Merge branch 'master' of codereview.qt-project.org:qt/qtbaseGunnar Sletta2011-09-131-1/+1
|
* Disabled tests for refactor->master integrationJo Asplin2011-09-133-1/+4
| | | | | | | | | | | | | | | | | | | | | | | This change disables failing tests to increase the likelihood that 'make check' terminates with a zero exit status. This is done to prevent the CI system from blocking further commits once qtbase#refactor is merged into qtbase#master. Failing tests are marked as insignificant (by putting 'CONFIG += insignificant_test' in the .pro file). Note: This is a temporary measure that needs to be cleaned up once the refactor->master integration is complete. Ideally all disabled tests need to be enabled and passing. All changes will be marked by the string QTBUG-21402 in a comment for easy location. Task-number: QTBUG-21402 Change-Id: Ic4400671671f6d9b75b106a6aa4755b20e74378d Reviewed-on: http://codereview.qt-project.org/4678 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Moved autotests in category 'tools' into new directory structureJo Asplin2011-09-12367-0/+48517
Task-number: QTBUG-21355 Change-Id: I315d4b1f55d42391524c0e8625952dee1b96fca3 Reviewed-on: http://codereview.qt-project.org/4449 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>