aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | Android: Rewrite the rules gathering binaries for packagingChristian Kandeler2018-10-041-8/+6
| | | | | | | | | | | | | | | | | | | | | | These rules were unnecessarily complicated; in particular, the indirection via a text file for the gdbserver and STL binaries was not needed. This also fixed the gdbserver file name in the package: It has to be libgdbserver.so, rather than just gdbserver as on the host. Change-Id: I2315660983904e8b922164be9054d6bba51f852d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-09-043-0/+39
|\| | | | | | | Change-Id: Ia115255ae46772a83c1196fbe291ff295927ee92
| * Executor: Fix invalid assertionChristian Kandeler2018-09-033-0/+39
| | | | | | | | | | | | | | | | An artifact whose alwaysUpdated property is false does not need to exist and is therefore not required to have a valid timestamp. Change-Id: I642349c49a53e6e45d6b09d1acc87f4c9a0edae9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | MSVC: Give hint about possible reason for missing import libChristian Kandeler2018-09-046-0/+74
| | | | | | | | | | | | | | | | | | | | If an import lib is unexpectedly not present, the reason is usually that no symbols are exported from the DLL. This is not obvious at all, so catch this condition and explain what is happening. Task-number: QBS-1291 Change-Id: Ia2df8e1a27e0231e855413245703ffc05221722e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Filter references to importingProduct from exported list propertiesChristian Kandeler2018-09-041-1/+6
| | | | | | | | | | | | | | | | It's just a heuristic, because we don't have access to single elements of JS arrays, but it should cover the most common cases. Change-Id: I02f9ff215394d108f7ba52662eff7b4f5e8e1a62 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Android: Properly support the aidl toolChristian Kandeler2018-08-276-1/+59
| | | | | | | | | | | | | | | | We now pull in the AIDL framework file and let the user set search paths for imports. Change-Id: I93460a77b064fa87849b93c0b0e4bd3bbfd7459f Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Fix race condition in TestBlackboxJobLimitsChristian Kandeler2018-08-132-11/+32
| | | | | | | | | | | | | | Do proper file locking in the test app. Change-Id: I985006c0e48a21b9412afd461edc3d7b9f02fcce Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-08-1010-0/+118
|\| | | | | | | Change-Id: I20256cb4a06cab8d191e389f08d77ace82e4d6b9
| * Fix potential false caching of module prototypesChristian Kandeler2018-08-107-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our code assumed that products with the same profile and the same multiplex configuration would also evaluate a module's condition to the same value, which is not true: Properties such as qbs.architecture, which are commonly checked in module conditions, can be set in a product item independently of multiplexing. We now evaluate the module condition for every product. According to our benchmarker, the slowdown is a very modest 2% and does not appear to increase for larger projects. This patch amends 08ce978733, which tried to address the same problem, but succeeded only for a subset of the possible cases. Change-Id: I992e0f0d5cf207949cf5d863f242b9476ecdfc05 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * 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>
* | Enable the Application item to create Android appsChristian Kandeler2018-08-106-31/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The formerly required AndroidApk item is no longer needed: We just tag the APK file as an application and let the Application item pull in the Android.sdk module for Android targets. It is also possible to have native code directly in the Application product; in that case, the multiplexed variants become dynamic libraries and the APK file is built for the aggregate. [ChangeLog] The AndroidApk item was deprecated, a normal Application item can be used instead. Change-Id: I04f5f3892f354ca9eb4f2da8055abcd8d072aba0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix JobLimits autotest on macOSChristian Kandeler2018-08-091-0/+4
| | | | | | | | | | Change-Id: I0fff631d5ddccf57ac67a7afd811ca319d589731 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Add support for job poolsChristian Kandeler2018-08-087-0/+372
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commands can now be assigned to an arbitrary job pool and a limit for the number of concurrently running jobs in such pools can be provided in a number of ways: - via the build command line: qbs --job-limits linker:1 - via the settings: qbs config preferences.jobLimit.linker 1 - in a project file: JobLimit { jobPool: "linker"; jobCount: 1 } We provide two job pools ourselves with the cpp module: "compiler" and "linker". [ChangeLog] Added the concept of job pools for limiting concurrent execution of commands by type Task-number: QBS-743 Change-Id: Ib3f361dbc73093e342bf0eba0daf2079a2b3a8ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge "Merge 1.12 into master"Christian Kandeler2018-08-033-6/+51
|\ \
| * | Merge 1.12 into masterChristian Kandeler2018-08-033-6/+51
| |\| | | | | | | | | | Change-Id: I0ce6c28f9117f945c9fec0654bd06daf3d13ace0
| | * Autotests: Prevent another false positive on slow CI machinesChristian Kandeler2018-08-021-0/+1
| | | | | | | | | | | | | | | Change-Id: I0243ca9cad9fcd5506a27b4b752f915633c9b493 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
| | * 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>
| | * Fix false positives in artifacts map change trackingChristian Kandeler2018-07-302-6/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to invalidate a script if it accessed the artifacts map and that map's keys are now different from what they were. However, that logic was too coarse: All rules that run after the command will add new artifacts, so such changes will be the norm, at least when the project is built for the first time. As a result, some artifacts might get rebuilt unnecessarily on the next qbs invocation. The reason why we did it that way was that we needed to consider the case where a script iterated over the elements of an artifacts map, e.g. using a for..in loop. In such a case, we cannot know which part of the map the code is interested in and the script needs to be re-run if the keys change. This is now solved with the help of a QScriptClass, which informs us if a script enumerates the keys. In all other cases, the script only accesses well-known tags, so we only have to compare the respective artifact lists and do not care about other keys getting added or removed. Change-Id: I182a50c34ece28f7ff3f7eba7a8f246e9b79b30e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | RulesApplicator: Fix possible assertion failureChristian Kandeler2018-08-033-0/+66
|/ / | | | | | | | | | | | | | | | | | | | | The RuleNode class disconnects removed input artifacts, which could break an assertion in the RulesApplicator in the case that a rule that can provide different tags to the same artifact switches back and forth between these tags. Fix this by re-establishing the connection between output artifact and parent rule node if necessary. Change-Id: I8d50190cba782ffe63d3a73b3d5400d95c99ea0e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | tst_blackboxqt: Add missing wait for timestamp updateChristian Kandeler2018-08-011-0/+1
| | | | | | | | | | Change-Id: Ia85d491394b1d6b7b894ea9740cd9d6b99d0b140 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Qt.core: Make moc rule catch changes to moc_*.cpp inclusionsChristian Kandeler2018-08-016-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the moc_xxx.cpp artifact gets created from the xxx.h input, but its file tags depend on whether it gets included by some cpp file or not. Because changes to such cpp files do not affect the xxx.h file in any way, the rule was not re-applied in the case such includes got added or removed. We fix this by making cpp files an auxiliary input to the moc rule, so it gets re-applied on changes to those files. Change-Id: I29b04fac3870f5a370cb7d894bc6ea56a63f6b0e 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>
* | Autotests: Shorten some product namesChristian Kandeler2018-07-273-3/+3
| | | | | | | | | | | | | | | | We've observed test failures on Windows due to path names getting too long. Change-Id: Ia5b5e377999112f5ff9cf0a0ce01709ce7863e99 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Extend TestBlackbox::addFileTagToGeneratedArtifactChristian Kandeler2018-07-182-1/+6
| | | | | | | | | | | | | | | | Verify also that the final output artifact disappears if we cut the connection between the rules. Change-Id: I31df34136e8b6305578e004abe06cd4a53f7dee5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | RulesApplicator: Fix assertionChristian Kandeler2018-07-183-0/+49
| | | | | | | | | | | | | | | | | | | | | | There can be input artifacts that are produced by a rule that is not connected to the current rule. This happens if at least one of the outputs of the rule that produces the input matches the excluded inputs of the current rule, in which case there is no connection between the rules. Change-Id: If51344e95e971ae89745ce7c20c2623774af42ae Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix change tracking edge case for when no outputs get createdChristian Kandeler2018-07-173-5/+67
| | | | | | | | | | | | | | | | | | | | | | Our change tracking information is stored per transformer. However, if Rule.outputArtifacts returns an empty array, then no transformer gets created. For this case, we need to "manually" force re-application of the rule if properties of the input artifact have changed, in case they've been accessed in the outputArtifacts script. Change-Id: I0f2b8a9834f5268a282c775a945e240d3d1d9763 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Make Artifact::setFileTags() a little smarterChristian Kandeler2018-07-162-0/+20
| | | | | | | | | | | | | | | | There's no general need for wholesale removal from the artifacts map, followed by (re-)adding. Instead, do just what is necessary. Change-Id: I5d4aa3c456d91bde94a8c77fb85f4e28ad5742d0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | RuleNode: Fix calculation of changed inputsChristian Kandeler2018-07-1610-0/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code had a number of problems: - It partially overlapped with the calculation of compatible inputs. - It was wrong in that it failed to consider inputs from dependencies. - It was wrong in that it assumed that after rule application, input artifacts always have parent artifacts to later compare timestamps with. This is not the case for e.g. a generated cpp file without a Q_OBJECT macro on which moc is run: No transformer is created in such a case, because the outputArtifacts array is empty. The last problem was glossed over by the fact that we held a global list of "changed source artifacts" in the executor, so such changes were spotted when they happened in source artifacts. However, that code was also rather dubious in itself because the criterion for "changed" was that the timestamp was newer than it was on the last run of the executor, so I don't think it was completely safe when doing partial builds. We solve these problems by remembering when we last applied the rule. An input artifact is considered "changed" if it has been modified after that. Change-Id: Ib1bafd9e1078122776626155c4f2cc11ad622191 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Report an error on unexpected output tagsChristian Kandeler2018-07-132-2/+40
| | | | | | | | | | | | | | | | | | | | The artifacts a dynamic rule produces need to be consistent with what it declares in its outputFileTags property. Somewhat suprisingly, such a check was missing so far, so we managed to make such mistakes in our very own modules. These are also fixed here. Change-Id: I9052a8c4b0423e8fd146c9fc67bf5c3ce752c638 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Remove support for in-build-dir-execution of the qbs qbs buildJoerg Bornemann2018-07-122-2/+12
| | | | | | | | | | | | | | | | | | | | This is not supported. People must use the content of the installation directory instead. This reduces complexity of qbs' own project files. Change-Id: I39f8bb4d5252b0631a64b3aac01f83b09b28ae0f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-07-125-2/+18
|\| | | | | | | Change-Id: I056a96c062881c2a07ec15b1803efa9c9aa1a02a
| * Autotests: Prevent another false positive on slow CI machinesChristian Kandeler2018-07-111-0/+1
| | | | | | | | | | Change-Id: I3577f425e40e1c19e5876e5d71f27455779a330e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
| * Update the timestamps of file dependencies of rescued artifactsChristian Kandeler2018-07-103-1/+8
| | | | | | | | | | | | | | | | | | | | | | Resetting the timestamps of file dependencies happens per artifact before the rescue procedure, so any dependencies added there must get their timestamp reset explicitly. Task-number: QBS-1359 Change-Id: Iec22b105a4132ada65b52391d4212c3b9ba52a2a Reviewed-by: Ola Røer Thorsen <ola@silentwings.no> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * benchmarker: Fix crash when called with no parametersChristian Kandeler2018-07-101-1/+8
| | | | | | | | | | | | | | The crash was accidentally introduced in da6c0e5058. Change-Id: If3a1ed1633fc8bb6aaf736859a89e1b7c17777c2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Autotests: Prevent another false positive on slow CI machinesChristian Kandeler2018-07-061-0/+1
| | | | | | | | | | Change-Id: I0ecc59ff2277be198415332af405394043fa77d4 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Remove workaround from TestBlackbox::pluginDependencyChristian Kandeler2018-07-101-4/+2
| | | | | | | | | | | | | | The problem we worked around there does not exist anymore. Change-Id: I856f33af5931bde80f2c85eb93b75cbf5e01bcf9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Track direct accesses to an artifact's fileTags propertyChristian Kandeler2018-07-104-0/+45
| | | | | | | | | | | | | | | | | | | | There are rules that access e.g. input.fileTags to look at file tags that are not the rules' declared tags. Such accesses were not tracked, so we did not re-run the respective prepare script or command when the tags changed. Change-Id: I7615c0c058ce42fb85963c8f481c18331c29ada7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge "Merge 1.12 into master"Christian Kandeler2018-07-067-6/+54
|\ \
| * | Merge 1.12 into masterChristian Kandeler2018-07-067-6/+54
| |\| | | | | | | | | | 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>
| | * Fix TestBlackbox::pluginDependency on MacChristian Kandeler2018-07-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | One of the checks fails in 1.12, because we still list "qbs" as an input file tag in the bundle module. Change-Id: I8f033e4dc653989b153182c11e6607afe5658e6e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * ModuleLoader: Fix misleading error messageChristian Kandeler2018-07-043-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | If a product could not get properly loaded and a per-product property override was given on the command line, we used to erroneously complain about the property override instead of reporting the real error. Change-Id: I1cbbc8ff9b6dcd453563c4745778576342862ca3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * Cover dependency parameter change tracking in autotestChristian Kandeler2018-07-042-2/+20
| | | | | | | | | | | | | | | Change-Id: I180feccc60857a5431e1c55354e478824f62b6fe Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * Autotests: Prevent another false positive on slow CI machinesChristian Kandeler2018-06-291-0/+1
| | | | | | | | | | | | | | | Change-Id: Id35b1843da772f703f1b2cb60487f9513c0a8efc Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * Autotests: Allow to parameterize the "file unlock grace period"Christian Kandeler2018-06-292-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | ... via the environment. This should help reduce false positives in our CI. Change-Id: I28492b4e476289f2d9418a272b167d9a679ebc5f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Fix TestBlackbox::sourceArtifactChanges on macOSChristian Kandeler2018-07-061-0/+7
|/ / | | | | | | | | Change-Id: I9a1be242f8c02d590a3c5adcdf1b8c43526fdef6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Remember which module properties were set explicitly on an artifactChristian Kandeler2018-07-051-0/+20
| | | | | | | | | | | | | | | | | | ... and consider these when updating the properties of generated artifacts during the change tracking process. This amends 768fc9c72e. Change-Id: Ifd3f6342fec8313b8cdd2e611734fc52a3810ae8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Do not reset the product build data due to source file metadata changesChristian Kandeler2018-07-056-15/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is not necessary to throw away and recreate all the product's artifacts and rule nodes if a source file's tags or properties change. Instead, just copy the new data into the corresponding Artifact object. As a necessary side effect, we also handle changes to the product- level module properties and to "fileTagsFilter groups" in a more fine- grained manner by resetting the properties and file tags of the product's Artifact objects that represent generated artifacts. This is part of a long-term effort to eliminate the build graph's "shadow structure" aka RescuableArtifactData. The next step will deal with added and removed source files. Change-Id: I054fa18d7920ea5c429c92bfca1c12e34192211e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | mingw: Create import libraries alongside DLLsChristian Kandeler2018-07-054-10/+3
| | | | | | | | | | | | | | This is the platform standard, and it gives us smart relinking for free. Change-Id: Iee9e14fe66c9418adaa14893fe2b4f573408f77d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-06-298-5/+147
|\| | | | | | | Change-Id: Ieaf617a09ed16cf0c81ea7621d4d0ba23741fbfa