aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/api
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '1.18' into masterIvan Komissarov2021-03-021-1/+0
|\ | | | | | | Change-Id: Ia45a5502f2d3c30807b5cab14666070973654b3a
| * cmake build: Fix project files updates in Qbs binaryIvan Komissarov2021-03-021-1/+0
| | | | | | | | | | | | | | | | | | | | Session class is located in the binary itself, not in the corelib, so we need to pass this macro there as well. Do that by making this macro "public" as Qbs build does. Task-number: QTCREATORBUG-25232 Change-Id: I50b2f8a533db82cf28fd5d29c17fcfdc410c5ab2 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Implement codesign moduleJake Petroules2021-02-181-1/+3
|/ | | | | | | | | | | | | | | This moves code signing functionality into a dedicated module, and also implements automatic provisioning for Apple platforms, which automatically selects appropriate signing identities and provisioning profiles based on the product being built. This also results in a significant performance improvement since all code signing setup information is retrieved in process instead of forking off the openssl and security command line tools. Task-number: QBS-899 Change-Id: I60d0aeaeb2d1004929505bcb1e0bc77512fe77bc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Apply modernize-use-nullptr fix-itIvan Komissarov2020-10-261-76/+76
| | | | | Change-Id: I404ac10a14517763daf656dd38dd560534cbf1fa Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* tests: Add missing 'std' namespaceDenis Shienkov2020-09-304-4/+4
| | | | | | Change-Id: Ib3bba4468bdf8851e61f48eecea597ae552c7647 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Initial CMake portIvan Komissarov2020-08-171-0/+10
| | | | | | | | | | | | | | | | | | | This change allows to build Qbs using CMake build tool Tested platforms - Linux (gcc) - macOS (clang) - Windows (msvc2017) Missing features (compared to Qbs build) - Documentation build - Bundled QtScript support - Static build - .pc file for qbscore - qbs module for qbscore Change-Id: I09b5dadd6723d5a47e5ef2a9a38d3300488718f2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix TestApi::disappearedWildcardFile()Christian Kandeler2020-07-291-0/+1
| | | | | | | ... for file systems with low timestamp resolution. Change-Id: Ie94543c229d912e79442399dbf095d9b77b8e1d4 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Add autotest for renaming a qbs project fileChristian Kandeler2020-06-224-0/+52
| | | | | | | | | | ... that is also a normal source file in a different product. Unfortunately, this does not trigger the behavior described in the linked bug report, but it can serve as a starting point. Task-number: QTCREATORBUG-24037 Change-Id: I78ffb7429b04db5f0eca45b9197ecb2b8bb31211 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Add a test case for source files disappearing during the buildChristian Kandeler2020-06-225-0/+52
| | | | | Change-Id: I4585c054b575168a5a90ae0c5a417c2a7f0e39ed Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* ProjectData: return const values/referencesIvan Komissarov2020-05-251-1/+1
| | | | | | | | | | | Qbs does not care that much about binary compatilibity (because of qbs session) and thus is is preferable to return members by const-ref (saving 2 atomic operations and preventing from accidental detaches). In case when method needs to compute some value instead of returning member directly, the function signature can be changed. Change-Id: I4e8d228761a990d274e77652c94adf9f43a758f1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix or skip tests to be able to run with the iOS profileIvan Komissarov2020-05-226-18/+54
| | | | | | | | | | | | This skips tests that are not possible to run without the device and fixes other tests for the iOS profile. Also, adds Travis job that runs tests using iOS profile. This is the squashed merge commit of the wip/ci-ios branch. Change-Id: Ia0c1fc05fdb8c6e269f5e66f979f2ae19465433c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix TestApi::localProfiles() for mingwv1.16.0Christian Kandeler2020-04-241-3/+3
| | | | | | | This test needed adaptation due to the change in d1ad96d31b. Change-Id: Ie5a0f2bbc4c939494ab499971f0f54fa811cecd3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* setup-toolchains now sets the qbs.toolchainType, not qbs.toolchainIvan Komissarov2020-03-091-2/+2
| | | | | Change-Id: I21f0626a093db358f8f5dfa6248672c44edc82e2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add clang-cl to the list of known toolchainsIvan Komissarov2020-03-061-0/+4
| | | | | Change-Id: I4521ac3de8822a9b7fecb33f6aa27cb380f01ed9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Introduce QBS_TEST_SOURCE_ROOT environment variableRichard Weickelt2020-02-271-1/+1
| | | | | | | | | | | | | | | This patch introduces QBS_TEST_SOURCE_ROOT environment variable that can be used to customize the source location of test data. Previously, the original testdata location was compiled into the test binaries. Thus it was impossible to run the test suites on a different host than the build host. In order to improve test coverage, we want to build the test suites once (for instance in a Docker environment) and then run them multiple times in different environments which might have a different file layout. In that case, the testdata location must be configurable. Change-Id: I7673826e6ea6f2e3aa893e657351a84c49a1033e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix code signing for Core Foundation bundlesLeon Buckel2020-02-131-0/+1
| | | | | | | | | | | | | | | | xcode.qbs: - Change the contents of xcode._actualSigningIdentity as expected by the actualSigningIdentity and actualSigningIdentityDisplayName properties - Use Utilities.signingIdentities() to get rid of warning ’Suspicious use of Process during property evaluation...’ - Throw error if specified identity was not found BundleModule.qbs: - Add ‘_CodeSignature/CodeResources’ to outputArtifacts with the tag ‘bundle.code-signature’ and ‘bundle.content’ - Remove local var ‘bundles’ which was always undefined - Fix ‘ModUtils.moduleProperty("qbs", "pathSeparator")’ resulting in ‘TypeError: Result of expression 'obj.moduleProperty' [undefined] is not a function.’ Change-Id: I1a529efb6164906d21203ff3f3be6e570137e8ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Allow relaxed matching of multiplexed dependenciesRichard Weickelt2020-01-292-0/+32
| | | | | | | | | | | | | | | | | | If a multiplexed product depends on another multiplexed product, Qbs previously forced all multiplexed properties to match exactly. Only if Depends.profiles was specified, the comparison was limited to the qbs.profile property and all other properties were ignored. While strict matching is usually the natural choice, there are corner cases where it limits the applicability of Qbs. For example when multiplexing product A over buildVariant, but product B over buildVariant and architecture. In such cases a relaxed matching would be desirable, where only the common properties of A and B are considered. As long as there is only a single resulting dependency, the dependency is unambiguous and safe. Task-number: QBS-1515 Change-Id: I4ae6b413229bf1577311b4198d0596447e650816 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* API tests: Fix a time stamp issueChristian Kandeler2020-01-081-0/+1
| | | | | Change-Id: Ia58cf8c14b091372921788e76e15a2ad1267e3d3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix 'performance-unnecessary-value-param' warningsIvan Komissarov2020-01-072-3/+3
| | | | | | | | | | Use more pass-by-const-ref since there is no point in passing objects by value in these cases Also, treat this warning as error Change-Id: I5382dcd56639f535cf240205cc5c3ac667c4ece3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* API: Do not try to do manual book-keepingChristian Kandeler2020-01-061-115/+40
| | | | | | | | | | | | | | | ... when adding/removing files to/from a project. We originally implemented this so that IDE users could edit their project files via the UI without having to re-resolve the project, thus saving time. However, great care has to be taken to ensure that we really do the same thing as would happen on a proper resolve step, and we do not seem to manage, as demonstrated by the crashes I have observed recently when removing files via Qt Creator. So let's play it safe and remove the shortcut. Change-Id: I38e7dcdba0aa129f43feec084ae140e1a57d2ee9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Simplify multiplexing testcaseRichard Weickelt2019-11-152-45/+0
| | | | | | | | | | Remove distracting items not relevant for the testcase itself. This was maybe a blackboxtest at some point in history, but now it is only an API test. We might need to expand it in the future and thus it is important to keep it free from irrelevant code. Change-Id: Icc0d962c4dbd21c32b4a99987eade2f66b8b78ac Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Evaluate probes before Profile itemsRichard Weickelt2019-09-253-0/+26
| | | | | | | | | | Profile items can reference project properties, but accessing properties of project-level probes failed. This patch ensures that probes are executed before Profile items are evaluated. Fixes: QBS-1490 Change-Id: I5c215b91ded51ac895e433faa2e6fcfbc3d3e212 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Introduce the session commandChristian Kandeler2019-09-181-1/+1
| | | | | | | | | | Offers a JSON-based API for interaction with other tools via stdin/ stdout. This allows for proper qbs support in IDEs that do not use Qt or even C++. Change-Id: Ib051a40b7ebe1c6e0c3147cca9bd96e7daec1fde Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* More autotest fixesChristian Kandeler2019-08-151-0/+1
| | | | | Change-Id: Icf6b9f7528bdb4b062b6586b12a08d8b410090fd Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* C++: Add support for clang on WindowsChristian Kandeler2019-08-144-7/+30
| | | | | | | | | | | | | This is about clang in "mingw mode", not clang-cl. When targeting Windows, clang is a lot like mingw, so factor out the common parts into a new base module. Testing uncovered a number of invalid assumptions in our autotests, which are also fixed in this patch. In addition, minor adjustments had to be made to the Qt.core module and to the qbscore lib. Change-Id: I73085dc62a65e2a9d0397cf234c8641989246f22 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix autotests for older compilersChristian Kandeler2019-08-071-0/+1
| | | | | | | | | Amends 923f98062b. Change-Id: Ib98279e962128573a46d8d6f9cfd822494d0dfd8 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Jochen Ulrich <jochenulrich@t-online.de>
* Remove actualRunTime check to fix tests on CIJochen Ulrich2019-08-071-23/+2
| | | | | Change-Id: I99bfb12bde67eb815f05451d4fdee48aef685699 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add command and AutotestRunner timeoutJochen Ulrich2019-08-015-0/+148
| | | | | | | Task-number: QBS-1454 Change-Id: I6e2514d10cca0cba0a14456ecd2abfb495539ee4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Work around deprecation warnings in Qthjk2019-07-241-3/+3
| | | | | Change-Id: Iff45f56fc91f3d513440a3e2aaf519a7aa0f7744 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Apply fix-its for the missing override keywordIvan Komissarov2019-05-032-3/+3
| | | | | | | | 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>
* Add support for the clang-cl compilerIvan Komissarov2019-04-102-0/+6
| | | | | | Task-number: QBS-1316 Change-Id: Ibf9da364610c260ead088a8990a70c7739d53c39 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-061-1/+2
| | | | | | | | 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-011-5/+5
|\ | | | | | | Change-Id: I96d2b13819f421d2dfdb922e451d04588d67812f
| * Use QStringLiteral more where it is possibleDenis Shienkov2019-02-251-5/+5
| | | | | | | | | | | | Change-Id: I7419cc3fbc1e8776de3943852dcedab4c95d1c32 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> 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>
* Introduce module providersChristian Kandeler2019-01-231-5/+3
| | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* Fix TestApi::generatedFilesList() for static QtChristian Kandeler2018-11-131-1/+2
| | | | | | | Another fallout of 5f1b52e1c6. Change-Id: I9b574723c52c7f2b9fb7d66a5dd12033654e2ec7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge 1.12 into masterChristian Kandeler2018-08-103-0/+62
|\ | | | | | | Change-Id: I20256cb4a06cab8d191e389f08d77ace82e4d6b9
| * ModuleLoader: Fix edge case in Depends.productTypesChristian Kandeler2018-08-083-0/+62
| | | | | | | | | | | | | | It makes no sense to consider multiplexed variants of the same product. Change-Id: I7ebee091264451dc587156a0c543932059ed9948 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-08-031-0/+5
|\| | | | | | | Change-Id: I0ce6c28f9117f945c9fec0654bd06daf3d13ace0
| * GCC: Allow the -march option to be set in project filesChristian Kandeler2018-08-021-0/+5
| | | | | | | | | | | | | | | | | | It is unrealistic to cover all its possible uses via dedicated properties. Task-number: QBS-1018 Change-Id: Iacfb9617ef130255c35766f057c60be9f816bca2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Make sure the set of root artifacts is always up to dateChristian Kandeler2018-07-313-0/+60
| | | | | | | | | | | | | | ... by updating it whenever artifact file tags change. Change-Id: I62496ba73f7633888de6be16aca59777a53629ed Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-07-061-4/+2
|\| | | | | | | Change-Id: I616949b321c26699ada0f2ae81b20a88db40b610
| * Autotests: Prevent another false positive on slow CI machinesChristian Kandeler2018-07-061-0/+1
| | | | | | | | | | Change-Id: I365acd2eb6fd27d3b31bcf7d84c00039166781ec Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Autotests: Allow to parameterize the "file unlock grace period"Christian Kandeler2018-06-291-4/+1
| | | | | | | | | | | | | | | | ... via the environment. This should help reduce false positives in our CI. Change-Id: I28492b4e476289f2d9418a272b167d9a679ebc5f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Remove the base module import from most test data projectsJoerg Bornemann2018-06-22122-221/+1
| | | | | | | | | | | | | | | | Keep the base import in blackbox/testdata/deprecated-property to ensure we don't accidentally break it. Change-Id: I790da21a7490ec9c1b0335f45e8707e7e04daa7c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-06-221-2/+2
|\| | | | | | | Change-Id: I3b5f14cf38452aaa740ac66cffa1e740f7349823
| * Check for duplicate entries in multiplex propertiesChristian Kandeler2018-06-151-2/+2
| | | | | | | | | | | | | | | | | | This used to lead to an error message about duplicate product names, which left the user in the dark about the actual problem. Change-Id: I460dcdf89112124cfd303529d42acd6c13fe9155 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>