summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/qmake
Commit message (Collapse)AuthorAgeFilesLines
* Make conflicting targets check less strictJoerg Bornemann2019-10-031-1/+1
| | | | | | | | | | | | | | People tend to "turn off debug and release builds" by just not building one of the variants. For example, Qt's own rcc is built in release only, however it is configured for debug_and_release with the same TARGET for both. Let qmake complain about conflicting TARGETs only we're about to build all of those conflicting targets, i.e. if build_all is set. Change-Id: I0448bf5cb421e2d801d3cc30e0d80353fba0d999 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-041-3/+0
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/codecs/qicucodec.cpp src/dbus/qdbusserver.cpp src/gui/painting/qbezier.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/printsupport/cups/qppdprintdevice.cpp Change-Id: I2703128bb64baf5580fbc2c2061b55b0f0611d2a
| * Fix qinstall on Windows for directories containing read-only filesJoerg Bornemann2019-08-151-3/+0
| | | | | | | | | | | | | | | | Initial patch by: Vlad Lipskiy <eswcvlad@yahoo.com> Fixes: QTBUG-77299 Change-Id: I803b809d1f23d844252b701cb070f6e4ba34eca1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-08-163-0/+108
|\| | | | | | | Change-Id: Ia3645f92b9debf3e1fe2d972300c7d0dbd649268
| * Add tst_qmake::qinstallJoerg Bornemann2019-08-143-0/+108
| | | | | | | | | | | | | | | | ...with a failing test case for QTBUG-77299. Task-number: QTBUG-77299 Change-Id: I42c4fc4bb96f8660f8ff9bea97e6096ca6cec972 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Determine dependencies of Windows resource filesJoerg Bornemann2019-08-138-11/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows resource files support a subset of C preprocessor directives. Among others they can have #include directives. Use QMake's own scanner to retrieve the files that are included by a Windows resource file and add them to its dependencies. For the test case the TestCompiler class had to be extended: runCommand is now public, and commandOutput is less peculiar. Fixes: QTBUG-3859 Change-Id: I138703352c37c98297c0574a9a440510c1c494b8 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Warn about conflicting DESTDIR/TARGET combination in debug_and_releaseJoerg Bornemann2019-08-093-0/+24
| | | | | | | | | | | | | | | | | | | | | | If a project has DESTDIR and TARGET set to fixed values, then the target paths conflict when doing debug_and_release builds. With this change we're detecting this situation and yield a warning. Fixes: QTBUG-2736 Change-Id: Ib163db3463322792ab9fa5b997285ac9fc9819ab Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | tst_qmake: Pass /nologo to jom like we do for nmakeJoerg Bornemann2019-08-091-1/+3
| | | | | | | | | | Change-Id: Id9b2ac4dd7d591d471d3e21e8d78d4915620a2c1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Remove usages of deprecated APIs of corelibSona Kurazyan2019-07-051-1/+1
|/ | | | | | | | | | | | | | | | | | - Replaced the usages of deprecated APIs of corelib by corresponding alternatives in the library code and documentation. - Modified the tests to make them build when deprecated APIs disabled: * Made the the parts of the tests testing the deprecated APIs to be compiled conditionally, only when the corresponding methods are enabled. * If the test-case tests only the deprecated API, but not the corresponding replacement, added tests for the replacement. Task-number: QTBUG-76491 Task-number: QTBUG-76539 Task-number: QTBUG-76541 Change-Id: I62ed4a5b530a965ec3f6502c6480808f938921aa Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix installation of .pdb files for applications that have VERSION setJoerg Bornemann2019-03-311-4/+1
| | | | | | | | | | | | | For applications that set VERSION the installation targets of pdb files were wrong in qmake's nmake Makefile generator. Replace code that tries to reconstruct that target's versioned extension with TARGET_EXT which already contains the fully resolved target extension. Fixes: QTBUG-74265 Change-Id: I9553a5f70170e077a59c866079ae51647ae80bef Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* tst_qmake: Add XFAILing testJoerg Bornemann2019-03-264-5/+58
| | | | | | Task-number: QTBUG-74265 Change-Id: I916eaf7b64a8777bf2523ddf9da65226d7d06417 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* tst_qmake: Keep the source dir cleanJoerg Bornemann2019-03-204-19/+75
| | | | | | | | | Copy the test data into a temporary directory and do all the work there without tainting the source directory. More importantly, do not pull in any settings from the Qt build to test what actual users will encounter. Change-Id: I793b86bfadb7597efb47c8f2d3fc863384c78a79 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix license headersJani Heikkinen2018-01-091-14/+20
| | | | | | | | | | | | Old header.LGPL21 header was used at some files. Replase those with new header.LGPL one Remove old header.LGPL21 Task-number: QTBUG-57147 Change-Id: I650e39024ed4876bba27e954c7d61fdb025b46ef Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Adapt qmake's raw-string parser to avoid confusion by macrosEdward Welbourne2017-08-243-2/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | A macro name ending in R might expand to a string; if this precedes a string constant, we're juxtaposing the strings. My first parser for raw strings would mistake it for a raw string instead, ignoring the part of the identifier before R. Re-worked the exploration of what came before the string to catch these cases, too. The backwards parsing would also allow any messy jumble of [RLUu8]* as prefix for the string; but in fact R must (if present) be last in the prefix and *it* can have at most one prefix, [LUu] or u8. Anything else is an identifier that happens to precede the string. Reworked the parsing to allow only one prefix and not treat R specially unless it's immediately (modulo BSNL) before the string's open-quotes. Add link to the cppreference page about string literals, on which the grammar now parsed is based. Added a test for the issue this addresses. Verified that this fails on 5.6, dev and 5.9 without the fix. Expanded the existing test to cover R-with-prefix cases. Task-number: QTBUG-55633 Change-Id: I541486c2ec909cfb42050907c84bee83ead4a2f4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Preserve last modification timestamps of installed filesSimon Hausmann2017-04-121-0/+1
| | | | | | | | | | | On non-windows platforms, we use the "-p" parameter of install(1) to preserve the last modification timestamps of files. On Windows the use of copy does not preserve them. As a cross-platform solution, this patch introduces a simple built-in install command in qmake to copy files. Task-number: QTBUG-59004 Change-Id: I3064d29a2b8c7b009a1efbf8f00b84c079ea5417 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* make extra compiler targets depend on their respective compilerOswald Buddenhagen2016-04-181-1/+1
| | | | | Change-Id: I6c04e0188137f6bbfeab243f00860b8ff079f69a Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-2155-935/+660
| | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-1817-21/+332
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/painting.pri src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro tests/auto/corelib/tools/qlocale/test/test.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp tools/configure/environment.cpp Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
| * qmake: teach findMocs to handle backslash-newline gracefully.Edward Welbourne2015-12-178-11/+103
| | | | | | | | | | Change-Id: Id71352c0cf71ab84bd81d4f3d11bb19dc7965903 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * qmake: teach moc-detector to handle C++-11 raw stringsEdward Welbourne2015-12-151-2/+1
| | | | | | | | | | | | | | | | As for the #include-parser, the moc-detector's minimal C preprocessor could be confused by a raw string into ignoring large chunks of code. Change-Id: Id688e9a1f04628ce75a51a7d15269078c734288e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * qmake: Fix comment false-alarm bug in findMocs().Edward Welbourne2015-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | If a / wasn't part of a comment-start, it and the character after it were none the less stepped over. If the character after started an enclosure, this would duly be missed, leading to mis-parsing of the subsequent text. As for similar bug recently fixed in findDeps(). Change-Id: Ie5329ec633c23a554b42a6351723c980e27fb9a9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Rewrote qmake's #include-detection to be more faithful to CPP.Edward Welbourne2015-12-155-11/+126
| | | | | | | | | | | | | | | | | | | | | | The C preprocessor allows backslash-newline anywhere and allows comments anywhere it allows space. Testing wilfully perverse applications of that revealed qmake's parsing of #include directives wasn't very robust. So rework to actually follow the rules and add those tests. Change-Id: If5cc7bfb65f9994e9ab9ed216dd1ee7285c63934 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Don't ignore first character after a string.Edward Welbourne2015-12-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | The parser in QMakeSourceFileInfo::findDeps() would step over the closing quote of a string, only to have a for loop then step over the character just after that closing quote, which was thus never studied; this could lead to problems in various ways. Fixed that and expanded findDeps() test to catch regressions. Task-number: QTBUG-17533 Change-Id: I7dec5222e38fa188495b39376ffee70bc7bbc87f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Teach qmake's #include parser to recognize C++11 Raw strings.Edward Welbourne2015-12-084-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | Can't sensibly test unless the compiler does support raw strings, since any test that would catch qmake's (prior) inability to parse raw strings would necessarily confuse the C++ compiler in the same way. This even applies (in test app code) to any #if-ery around the raw string, since tokenization happens before preprocessor directives are resolved. So the #if-ery on Q_COMPILER_RAW_STRINGS has to be in tst_qmake.cpp, not the test app it builds. Change-Id: I4a461f515adff288b54fb273fd9996f9b906d11c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Tests: Remove empty init/cleanup slots, constructors and destructors.Friedemann Kleint2015-12-101-21/+1
| | | | | | | | | | | | | | | | Move some code (like registrations of meta types) from init() to initTestCase() in the process. Change-Id: I57db5156647cfadab554fbed853b2e68b2815f3b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2015-11-271-0/+5
|\| | | | | | | Change-Id: Ib43c6f126998eefcfed9a7c1f2bcbac8b4dd05ec
| * Ignore stuff created during testingEdward Welbourne2015-11-251-0/+5
| | | | | | | | | | Change-Id: I05c93c9739ff8397606088d0b23e58d145f124a4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-233-3/+9
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/thread/qthread_unix.cpp Change-Id: Ia08d613c3f0bd08cb6dc3e3a57257207dfd4a099
| * Avoid having division caught up in parsing of comments.Edward Welbourne2015-11-203-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A loop to skip space and comments was meant to break on anything else but would have not broken on a division operator (where it should) due to it getting caught in the check for a comment-start, without falling back suitably when it didn't complete that check. Managed to contrive a suitably twisted change to findDeps test to reveal the bug; broken previously, now fixed. Not ideal, as it relied on another bug to fail previously - backslash-newline shouldn't end a preprocessing directive line - but it should still pass once that's fixed, too. Exercising a bug in qmake usually involves code that won't compile anyway, making it tricky to write a test that reveals the bug but that passes once it's fixed. Change-Id: I08a1d7cc5e3d7fd1ac0a48e5c09dfdfbb7580b11 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Tests: Fix single-character string literals.Friedemann Kleint2015-10-131-1/+1
| | | | | | | | | | | | | | Use character literals where applicable. Change-Id: I1a026c320079ee5ca6f70be835d5a541deee2dd1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Tests: Remove CONFIG += parallel_test.Friedemann Kleint2015-09-051-1/+0
|/ | | | | | | The keyword no longer has a meaning for the new CI. Change-Id: Ibcea4c7a82fb7f982cf4569fdff19f82066543d1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-0326-821/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qnamespace.qdoc src/corelib/io/qwindowspipereader.cpp src/corelib/io/qwindowspipereader_p.h src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/plugins/platforms/xcb/qxcbconnection.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/tools/qmake/tst_qmake.cpp tests/manual/touch/main.cpp Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
| * remove now redundant testsOswald Buddenhagen2015-05-2026-821/+0
| | | | | | | | | | | | | | the functionality is now covered by the qmakelib test. Change-Id: Id627f573fb247ff3b86558509e27b6a9862c1a59 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Allow RESOURCES to contain standalone files and collections of filesTor Arne Vestbø2015-05-186-0/+105
|/ | | | | | | | | | | Standalone files are added by using RESOURCES += file.txt, while collections of files are defined as collection.files = f1.txt f2.txt and then added using RESOURCES += collection. For collections a prefix can also be set using collection.prefix = /foo. The standalone files are not prefixed. Change-Id: I8236808238414da05e744f799a1bb15a72f4a46f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* more autotests for spaces, destdirs and library linkingOswald Buddenhagen2015-02-1712-37/+56
| | | | | Change-Id: Ie106d1151e61a50081bccea0a6d0d70728451a5b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-1159-413/+413
| | | | | | | | | | | | | | | | | | 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>
* make shellQuoteWin() be more sparing with circumflexesOswald Buddenhagen2015-02-041-3/+3
| | | | | | | | | | | | ... as newer versions of nmake (and jom, for compatibility) have botched circumflex processing (they simply don't do it when shortcutting the shell evaluation). as a side effect, the output is also more readable if the string contains quotes. Change-Id: I0506b59ceecb70da258c482f9973156b2803066d Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* de-noise testOswald Buddenhagen2015-02-042-0/+4
| | | | | | | | don't complain about various missing things resulting from replacing default_pre.prf and having a private .qmake.cache. Change-Id: Ie3471b514ebb1a80b72a480144551b56b5c7a254 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* make test support qmake path with spacesOswald Buddenhagen2015-02-043-19/+30
| | | | | Change-Id: I66d8b3cc742c44d02c224bbfc4086500af0d5f4a Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-2459-1121/+649
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* add priority sorting to $$resolve_depends()Oswald Buddenhagen2014-07-301-0/+9
| | | | | | | | all else being equal, items with a higher numerical priority will appear first in the result. Change-Id: I4ee37ff404a53c4152a1e4fc2fc3c23ef525234d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add JSON parsing support to qmake.Morten Johan Sørvig2013-10-173-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add qjson* implementation files from corelib/json to the qmake build. Add a read-only compile mode, enabled by defining QT_JSON_READONLY. Add qmake built-in function parseJson(file, into) which parses a json file into the given variable. qmake uses a flat key -> value-list implementation for storing variables, which means that some hackery is need to represent arbitrarily nested JSON. Use a special "_KEYS_" variable for arrays and objects: Arrays: ["item1", "item2"] $${array._KEYS_} -> 0 1 2 $${array.0} -> "item1" $${array.1} -> "item2" Objects: { "key1" : "value1", "key2" : "value2" } $${object._KEYS_} -> key1 key2 $${object.key1} -> value1 $${object.key2} -> value2 Change-Id: I0aa2e4e4ae14fa25be8242bc16d3cffce32504d2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* change reporting of missing filesOswald Buddenhagen2013-08-201-1/+1
| | | | | | | | | | use the new parser flags to report all i/o errors directly. as a notable side effect, the "WARNING" prefix is gone (even though it is still treated like that, which is mildly insane to start with). Change-Id: I084375d5e7a3314ae763795f7c318804a9fb84b6 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* make split_value_list() even less sane againOswald Buddenhagen2013-07-032-0/+3
| | | | | | | | | | | contrary to what one may expect, it's actually *not* supposed to remove the meta-characters it interprets. luckily, this function is not used much any more ... Task-number: QTBUG-31877 Change-Id: I2b60f9b173140da78db2b07b596cc2e5f6e6d555 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove nonsense DEFINESOswald Buddenhagen2013-07-0329-59/+0
| | | | | Change-Id: Ie079c52eb800878983501b9fe2b2f6c27df0cdb1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* test: Skip tst_qmake::include_dir() when -no-widgets is usedSergio Ahumada2013-06-241-0/+4
| | | | | | | | Only run this test case when the widgets module is present, skip it otherwise. Change-Id: I84f48b670b967af3bf0701ceba5a192f33989034 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Don't run qmake test that requires macx makespec on non Mac OS platformsTor Arne Vestbø2013-02-201-5/+4
| | | | | | | And update test to use the clang makespec now that it's the default. Change-Id: Ifdd34c4220ad76f60b91fd6ef39d189f0f6525f9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1859-59/+59
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* remove some unnecessary CONFIG additionsOswald Buddenhagen2012-12-177-7/+3
| | | | | | | | qt is already added by spec_pre.prf, warn_on and depend_includepath by default_pre.prf. Change-Id: Ic00e0ba496d698ed9659c476f2ca99fc0f86a093 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* qmake: Test recursive function callsKonstantin Ritt2012-11-261-0/+14
| | | | | Change-Id: If7d659728d30b2e5c52082ab999bc00de3733972 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>