aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Darwin: Adapt to Xcode 11Christian Kandeler2019-10-041-1/+2
| | | | | | | | | | | | | | - xcspec files can now refer to variables in variable names, as in the following line: CONTENTS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH_SHALLOW_BUNDLE_$ (SHALLOW_BUNDLE)) - Some new environment variables have been introduced and need to be set when running our probes; e.g. "SWIFT_PLATFORM_TARGET_PREFIX". - The symbolLinkMode autotest made an invalid assumption about order of output. Change-Id: Ic845c2c4a8eafb4ece0f0bb04e6e492681a02979 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Autotests: Work around compression bug in 5.13.0Christian Kandeler2019-08-301-1/+2
| | | | | | | Our QtScxml test ran into QTBUG-76521. Change-Id: Id667846acd165d5b79dd6acc9cb8c790f6e228a2 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Process Command: Do not needlessly interpret output as textChristian Kandeler2019-08-267-0/+50
| | | | | | | | | ... when redirecting process output. Only do that if there is an output filter function. Otherwise, we break redirection of binary data. Fixes: QBS-1488 Change-Id: Ic5a1d2653fa8fc9c4f0eb5d31b7315d7aba3e030 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Work around deprecation warnings in Qthjk2019-07-241-3/+3
| | | | | Change-Id: Iff45f56fc91f3d513440a3e2aaf519a7aa0f7744 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add support for gRPC to the protobuf.cpp moduleIvan Komissarov2019-06-275-0/+115
| | | | | | | | This implements support for the gRPC framework: https://www.grpc.io Change-Id: Ia85461b9618e73827114c137fce8615e5a8139e3 Reviewed-by: Qbs CI Bot <travis-bot@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix TestBlackboxApple::infoPlist for tvos/ios/watchos platformsIvan Komissarov2019-06-261-5/+32
| | | | | | | | | | | | | | | On non-desktop OSes, Info.plist is located in the other folder: infoplist.app/Info.plist instead of infoplist.app/Contents/Info.plist Plus, it uses binary format by default, so convert resulting file to JSON to simplify checking its contents Plus, some properties that are present on macOS are not present on ios/others. Check only common subset plus macOS-specific properties Change-Id: Ic709f6b79a5ecc89c3866ca69ca4004341dfad9f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix TestBlackboxApple::xcode for tvos/ios/watchos platformsIvan Komissarov2019-06-262-8/+40
| | | | | | Change-Id: Ieed4b81a83e8b8a5c8c061f985587aded3e13ec3 Reviewed-by: Qbs CI Bot <travis-bot@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add PathProbe::candidateFilter propertyIvan Komissarov2019-06-263-0/+15
| | | | | | | | | | | | | | | This property can be used to check if candidate conforms with some conditions. For example, an architecture of a shared library candidate should match the current qbs.architecture. Also, this will allow to implement support for the "text based stub libraries" (yaml files that point to a real library in a system) on macOS - instead of checking real file architecture, it should be read from .tbd file Change-Id: Ie84a3e70d883dec949440358e2f08213a8501982 Reviewed-by: Qbs CI Bot <travis-bot@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Allow PathProbe to search multiple filesIvan Komissarov2019-06-2522-0/+190
| | | | | | Change-Id: I6ae2dd130cbafb03e51bc6e8e8a3e262d6d45fc6 Reviewed-by: Qbs CI Bot <travis-bot@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Apply modernize-loop-convert fix-itIvan Komissarov2019-05-211-2/+2
| | | | | | | Makes clang-tidy happier Change-Id: Ic29b552572719ea58c7ad385cc6e1d68cef9eedc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Apply modernize-use-auto fix-itIvan Komissarov2019-05-201-6/+6
| | | | | | | | Makes clang-tidy happier Change-Id: I75f3b6409b425b9a7054d7886ab0160a040b25d5 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix -Wclazy-inefficient-qlist-softIvan Komissarov2019-05-201-3/+6
| | | | | | | | | QLists were used with types that bigger than sizeof(void*) which lead to extra allocations Change-Id: Id716c6b4919f9a0ad62e1d2972319a600785afc5 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add test for precompiled header and redefined macroIvan Komissarov2019-05-116-0/+87
| | | | | | | | | | | This illustrates the warning emitted by clang-cl when macro definition differs in a file and pch. Warning is emitted because of -Wclang-cl-pch flag which is enabled by default Change-Id: I48f39bd77db5be85b9cd2e0226c0b4e7931a9d5b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge 1.13 into masterChristian Kandeler2019-05-106-17/+75
|\ | | | | | | Change-Id: Ic02d717f80f5d831f0cedb3b7c565a9bfef3a2a3
| * Fix TestBlackboxQt::staticQtPluginLinking()Christian Kandeler2019-05-083-3/+18
| | | | | | | | | | | | | | As of 3f80c821e9, we no longer link plugins into static libraries. Change-Id: I35816d0d84b8758fb9792387bf450d53d7ea6e5a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Fix qbsConfig test on MacosIvan Komissarov2019-05-021-2/+4
| | | | | | | | | | | | | | | | | | | | | | It seems, that QSettings is not working properly with SystemScope on Macos (QTBUG-21062). QSettings::fileName returns a path to a file in a test directory, not in "/Library/Application Support" as expected. Thus, canWriteToSystemSettings is true and test fails when real qbs binary tries to write to the /Library... location Change-Id: I726360a1daacf4871f944f5afe30089083283dce Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Fix compilation errorIvan Komissarov2019-04-301-3/+3
| | | | | | | | | | | | | | stdout is a define and should not be used as a variable name Change-Id: If84e526211bcaf8f3f7e169d95c5ea093e712ef4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Fix lexyaccOutputs with outdated BisonIvan Komissarov2019-04-292-8/+35
| | | | | | | | | | | | | | | | On Macos, default bison version is 2.3 which means newer syntax is not recognized and test fails Change-Id: I1180528fc8f4aa49f5327e736c1c97dade53c194 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Print LC_BUILD_VERSION instead of LC_VERSION_MIN_MACOSXIvan Komissarov2019-04-262-4/+18
| | | | | | | | | | | | | | LC_BUILD_VERSION was introduced in apple clang 10.0 Change-Id: I06dd5bba7cab7d28d83c50f2878b5b434e97cca0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Apply fix-its for the missing override keywordIvan Komissarov2019-05-035-9/+9
| | | | | | | | | | | | | | | | Missing override is a warning in clang Change-Id: I90b899df37e690aebb942bffc65db54d9aa4050f Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix uninitialized variablesIvan Komissarov2019-05-024-8/+8
| | | | | | | | | | | | | | | | | | This fixes most of clang analyzer warnings about uninitialized variables in ctors Change-Id: I879c785594307ed3fe7140588338a6b2a1e4db65 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.13 into masterChristian Kandeler2019-04-261-3/+6
|\| | | | | | | Change-Id: Ife9f7cd99dd5a531bcb670b2dfbd245471a8c379
| * Do not check for minimumMacosVersion when not specifiedIvan Komissarov2019-04-251-3/+6
| | | | | | | | | | | | | | Since macOS 10.14, the LC_VERSION_MIN_MACOSX is not inserted into binary when compiling for the current macOS Change-Id: Id5fce8fecc656916d3b1c2cb9f07716b6c86a07a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | [Android] Allow the user to override version attributesBogDan Vatra2019-04-241-0/+2
| | | | | | | | | | | | | | | | Allow the user to override the android::versionCode and android::versionName from QBS project file. Change-Id: I437294e8f6b52c1072bb1c992d1c7ac5233896c9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix tests on non-latin systemsIvan Komissarov2019-04-232-2/+5
| | | | | | | | | | | | | | | | Qt Creator uses non-latin letters in path to the build directory in case of ru_RU.UTF-8 $LANG on Linux. Now QBS does handle that correctly. Change-Id: Ifc727b120a5f0ee60972c5e3ed24067426db8df2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Add support for the clang-cl compilerIvan Komissarov2019-04-107-2/+21
| | | | | | | | | | | | Task-number: QBS-1316 Change-Id: Ibf9da364610c260ead088a8990a70c7739d53c39 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.13 into masterChristian Kandeler2019-04-052-3/+4
|\| | | | | | | Change-Id: I277770ed530866f70c63c57b6f605ab49baf9d06
| * Android: Auto-detect Android.ndk.platformChristian Kandeler2019-04-051-2/+1
| | | | | | | | | | | | | | ... the same way as Android.sdk.platform. Change-Id: I974fdfd9f56f312cbd39ea155d87694622a9c0b8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Fix badInterpreter autotestChristian Kandeler2019-04-051-1/+3
| | | | | | | | | | | | | | I now get a different error message after a system update. Change-Id: Ic403e065c80e9297eadb636faf06a057d9328be6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Use auto when declaring iteratorsIvan Komissarov2019-03-071-24/+24
| | | | | | | | | | | | | | | | modernize-use-auto Change-Id: I13e1d76493f860e2d38202c34c2ee29e88155487 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Use pass-by-value and moveIvan Komissarov2019-03-071-2/+6
| | | | | | | | | | | | | | This fixes -Wmodernize-pass-by-value Change-Id: I85a732867866e43c39c1d77937fbc645433c96bd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix calls to non-const begin()/end() in range-for loopsIvan Komissarov2019-03-064-5/+8
| | | | | | | | | | | | | | | | This fixes -Wclazy-range-loop Change-Id: I08a435b700017cdbe27fbfdbda6e26840d9a3568 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | Merge 1.13 into masterChristian Kandeler2019-03-0126-190/+192
|\| | | | | | | Change-Id: I96d2b13819f421d2dfdb922e451d04588d67812f
| * Android: Check for valid package name upon package creationChristian Kandeler2019-02-273-0/+4
| | | | | | | | | | | | | | | | | | That's nicer than letting users get a cryptic error message when they try to install their package on the device. Change-Id: Ie5321a28475f879f991c4440c7e64c1c3ebd5a9d Fixes: QBS-1428 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Return initializer list where it is possibleDenis Shienkov2019-02-266-26/+20
| | | | | | | | | | | | | | | | | | This fixes this clang-tidy warning: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] Change-Id: I421e1e47462fe0e97788672684d47943af7df850 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Use QStringLiteral more where it is possibleDenis Shienkov2019-02-2513-139/+139
| | | | | | | | | | | | Change-Id: I7419cc3fbc1e8776de3943852dcedab4c95d1c32 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Replace 'typedef' with 'using' where it is possibleDenis Shienkov2019-02-232-3/+3
| | | | | | | | | | | | | | | | One exception is that the 'typedef' for function pointers were skipped due to an additional work is required. Change-Id: I2112fded3abeaee1d1f49f56adfd2914d5db0324 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Use 'const auto' keywords more at objects allocationsDenis Shienkov2019-02-237-15/+15
| | | | | | | | | | | | Change-Id: I592d433e7c473ae9f27ca08e701516efe53650ba Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Replace non-const calls to temporaries with constIvan Komissarov2019-02-212-5/+9
| | | | | | | | | | | | | | | | This fixes -Wclazy-detaching-temporary Change-Id: I3c866c29c05f16e93eb86551efb21ccf9dc120b9 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Add const-references for non trivial types in range-for loopsIvan Komissarov2019-02-201-2/+2
| | | | | | | | | | | | | | This fixes -Wclazy-range-loop Change-Id: I5424d2626d6134ac7be2ce70b83f5a617f58dd7e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Stop using the excludedAuxiliaryInputs property in autotestChristian Kandeler2019-02-121-1/+1
|/ | | | | | | We scheduled it for removal in 1.14. Change-Id: I2886e654dfe2625df265d569559412f7b88e7f0b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Detect Qt via a module providerChristian Kandeler2019-02-121-9/+6
| | | | | | | | | | | | | | | | | Creation of qbs modules for Qt is now done on demand during project resolving. The qmake executable(s) are looked up via PATH or taken from the Qt.qmakeFilePaths provider property. As a result, Qt projects can now be built without a profile. The qtprofilesetup library is gone; its code is now in the module provider. I kept the C++ -> JavaScript conversion as straightforward as possible and mostly resisted the temptation to "optimize". The setup-qt tool still exists and mainly sets Qt.qmakeFilePaths. [ChangeLog] It is no longer required to call setup-qt before building Qt projects. Change-Id: I5b7e4711ec47b996911c499f29d8129d90e4731e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Module providers: Fix some change tracking problemsChristian Kandeler2019-02-111-1/+2
| | | | | | | | | | | - We must not remember our temporary files. - We need to use a different reference time stamp for the created modules. - Collecting the results of File.exists() & friends can lead to false positives, so we disable it for now. Change-Id: Id64685b510606f1991e83eb825c36a1b3ec4a4e1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Qt: Allow users to explicitly tag files as mocableChristian Kandeler2019-01-296-0/+57
| | | | | | | | | This is helpful for declaring a QObject-derived class via a macro, in which case the moc scanner will not help. Fixes: QBS-1410 Change-Id: I19ee30eac670228686b5528888159220cf39abd3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Introduce module providersChristian Kandeler2019-01-2311-6/+187
| | | | | | | | | | | | | | | | | | | | | | If a dependency is not found, we now search for a matching module provider that can generate one for us. We also provide a generic fall-back provider which uses pkg-config to locate the dependency (but could be extended to incorporate other methods in the future). This is the most important part of this change for practical purposes, as it makes hundreds of popular libraries available for use in qbs projects without users having to write any boilerplate code. In a future patch, a module provider could also be used to implement the functionality of the qtprofilesetup library, relieving users of the need to create a profile for building Qt applications. [ChangeLog] The Depends item now falls back to pkg-config to locate dependencies whose names do not correspond to a qbs module. Fixes: QBS-1107 Change-Id: Ifd4f05c237cf58cd9fe707c3da648d3dbb33e82b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add recursive dependency scanning of GNU ld linkerscriptsOla Røer Thorsen2019-01-185-12/+116
| | | | | | | | | | | | | | Linkerscripts may contain INCLUDE and SEARCH_DIR commands that allows it to include other linkerscripts in a similary way as headers are included in C++. This commit adds a scanner that adds these additional dependencies. [ChangeLog] Added recursive dependency scanning of GNU ld linkerscripts that contain INCLUDE and SEARCH_DIR commands. Change-Id: I7549e27aad4fe7ade2a6a26eba14f66880261077 Reviewed-by: Ola Røer Thorsen <ola@silentwings.no> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* C++ scanner: Register for rc filesChristian Kandeler2019-01-174-6/+28
| | | | | | | | Windows resource files can have #include statements. This was either overlooked from the beginning or we broke it at some point. Change-Id: I3483e8caf352f557768429cf3c4f9b3293fec38d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Scanner item: Do not re-use the searchPaths value for other inputsChristian Kandeler2019-01-158-0/+52
| | | | | | | | | | | For the C++ scanner, the search paths depend on module properties, not on the actual input file. This assumption does not generally hold for Scanner items, which was not taken into account when this feature was originally introduced. As a result, the first input to get scanned by a Scanner item erroneously provided the search paths for all others. Change-Id: I0159d826dac1f5605494d54cfe96fe468044ca34 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix buildChristian Kandeler2019-01-141-1/+1
| | | | | | | Amends 893b4dc56c. Change-Id: If4e5216bf24c97773c3c58983e3d4caccaac70ff Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Qt support: Use gold linker if Qt is configured that wayChristian Kandeler2019-01-144-0/+27
| | | | | | | Fixes: QBS-1421 Change-Id: I1f6d749eba38c9a4caa60341f19ee5e89e89d28a Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>