aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* ModuleLoader: Remove invalid assertionChristian Kandeler2017-08-142-1/+34
| | | | | | | | The assumption that all list properties must have acquired a defining item at some point is simply wrong. Change-Id: I34d035e50b5d5cd8c62f1baba899326b92ade8d1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix buildChristian Kandeler2017-08-141-1/+1
| | | | | Change-Id: Ib8d2ba1860bb1e64dce149afb8a1bfd2ac10f604 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix build data rescuing when multiplexingChristian Kandeler2017-08-144-0/+28
| | | | | | | | The code assumed that we could only multiplex over profiles, which is no longer true. Change-Id: Ia0a522b701d3ed983d484d0683e1417ab2adeb94 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add autotest checking that module loading respects property overridesChristian Kandeler2017-08-145-0/+50
| | | | | Change-Id: I938cb7a27d1bcc5cd9885a3aae7b5a076edb9ef2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix recursiveWildcards() autotestChristian Kandeler2017-08-031-0/+2
| | | | | | | | We forgot to wait for a new timestamp before doing the file system updates. Change-Id: I23bdcabc397d2b490c81cd6e894fb9929b2f7c62 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix change tracking for wildcardsChristian Kandeler2017-08-032-0/+56
| | | | | | | | | | The code that stored the directory timestamps erroneously assumed it would get called recursively in the case of a "**" construct. As a result, the mechanism failed for files created or removed anywhere else than in the first level of the directory hierarchy. Change-Id: I8978e1fb8daa63e402be02bb47d171554703b54f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Do not access the bundle module unconditionallyChristian Kandeler2017-08-0227-52/+153
| | | | | | | | | | It is a mistake that the NativeBinary item currently pulls in the bundle module unconditionally (and also that the module is enabled everywhere). We want to change that. Prepare for the change by removing all unconditional accesses to the module's properties. Change-Id: If57b8222c1a0e2b09c33520882446fa71401f1f1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Autotests: Ensure that waitForNewTimestamp() always terminatesChristian Kandeler2017-07-311-3/+8
| | | | | | | | | | Apparently, the abovementioned function has been observed to run seemingly forever in certain environments. Fix that by no longer requiring an actual file timestamp change for it to terminate. Task-number: QBS-1169 Change-Id: I9798309d179b0b6f8857ca8a4a5c1236ca162c27 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Revert change to module merger that broke overriding list propertiesChristian Kandeler2017-07-312-5/+24
| | | | | | | | | | | ... from the command line. The original change was part of 41595d0cf8, but it is not clear anymore exactly which problem it was supposed to solve. It may well be that it only worked around a temporary problem that no longer existed when the patch was merged. Task-number: QBS-1152 Change-Id: I7e89cf4bf64ef5c8dae5e598154403d4909969c0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix glitch with new module property access syntaxChristian Kandeler2017-07-271-2/+2
| | | | | | | | | | There was a problem with multi-component module names: It was not possible to use constructs like 'input["Qt.core"].x', which made it practically impossible to pass module names in variables and use these to access properties. Change-Id: Ic200ba2dcfd4abba51a5ed84cf67a3e090c11d7c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add test case for a "dynamic project"Christian Kandeler2017-07-245-0/+53
| | | | | | | | While we did not consciously implement that feature, we should strive to keep it working, as people are using it. Change-Id: I15f43a45b02e7c241bf9d37bed507b0c2037822d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix autotest on MacChristian Kandeler2017-07-211-1/+2
| | | | | | | The ar tool there does not handle the case of an empty object list. Change-Id: Iccb611c4ba2e6f16a5411d97f72644e410b8b646 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* GCC: Don't assume the presence of sources in static library productsChristian Kandeler2017-07-214-0/+23
| | | | | | Task-number: QBS-1163 Change-Id: I56790b32796f33f7474ffbc95c7f3c86ee8d3c1d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Avoid hardcoded paths to the Windows system drive/root and shell pathJake Petroules2017-07-203-4/+6
| | | | | | Change-Id: Ib85025466b885734a607294245c63d7e361cc20b Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add XFAILing autotest for false positive in declaration checkerChristian Kandeler2017-07-134-0/+31
| | | | | Change-Id: I7c8cfebd9d5ab0a97cfac8f2775638123c54b667 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix behavior with corrupt or outdated build graphsChristian Kandeler2017-07-1011-19/+75
| | | | | | | | | | | | Commit b6bf17cfd1 introduced a glitch in that a rebuild using a build graph whose magic string does not match would throw an error at the first attempt and silently succeed at the second one. The new behavior is the same as for attempts to rebuild with property changes: A plain "build" fails, a "resolve" does the trick. Some more code had to move from the command line parser to the loader to achieve this. Change-Id: I906748cc1686c0c5d413d9451ec9e2aa26ea2035 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* De-noise "deprecatedProperty" autotestChristian Kandeler2017-07-071-1/+3
| | | | | Change-Id: I09a704534a470eaad514cd6c0d40f2a9801a61a5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Cpp module: Default value for use*PrecompiledHeader is now trueChristian Kandeler2017-07-055-5/+0
| | | | | | | | | | | | | This is of course the right default: If a precompiled header is present, then you will tpyically want to use it. We just couldn't do that so far, because we did not have access to the "explicitlyDependsOn" artifacts in the compiler rule. Now we do. [ChangeLog] The property cpp.useCxxPrecompiledHeader, as well as the variants for the other languages, now default to true. Change-Id: Ie04172790ad21b0ebdfbf3366b6f549f705e774c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix build error with Qt < 5.7Christian Kandeler2017-07-041-0/+1
| | | | | Change-Id: I6115696c30f06dbcc445708ce8542881c29c6acb Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix false positive in property declaration checkerChristian Kandeler2017-07-042-1/+22
| | | | | | | | During export item merging, we lost the information about whether the property was setup by a Properties block. Change-Id: I899188b10aea66dfcfdb61e348d93be1f69347a3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Give rules access to artifacts matching "explicitlyDependsOn"Christian Kandeler2017-07-046-25/+81
| | | | | | | | | | | | | | If outputs "explicitly depend on" other artifacts, then it is very likely that these are needed in the prepare script and/or the command. In fact, such artifacts are almost like inputs, except that they are always passed the same way, regardless of whether we have a multiplex rule or not. [ChangeLog] Artifacts corresponding to the "explicitlyDependsOn" property are now available under this name in rules and commands. Change-Id: I28e41c29e250cccb1a64e83152528c28f48d5703 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix TestBlackbox::auxiliaryInputsFromDependencies()Christian Kandeler2017-06-301-0/+1
| | | | | | | It failed for systems with low timestamp resolution. Change-Id: I0c16a134f5042937209defee4598a556ec6dffc7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix change tracking with Rule.requiresInputs == falseChristian Kandeler2017-06-301-0/+6
| | | | | Change-Id: I65edd82bb70e19cdd00b9bba732e9db1aee36f9b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Make Rule.auxiliaryInputs consider outputs of rules in dependenciesChristian Kandeler2017-06-302-9/+36
| | | | | | | | | | | | | | | ... and do the same for Rule.explicitlyDependsOn. Users had to write custom rules to prevent a race condition if their C++ sources pulled in headers generated as target artifacts of other products. This patch fixes that. [ChangeLog] A rule's "auxiliaryInputs" and "explicitlyDependsOn" tags are now also matched against rules of dependencies, if these rules are creating target artifacts. Task-number: QBS-1113 Change-Id: I78b84a7be9cff57145b7fb4e52fdbcd588f94640 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Introduce Rule.requiresInputsChristian Kandeler2017-06-306-0/+62
| | | | | | | | | | | This supports the use case of a rule that wants to create its output even if no artifacts match the declared inputs. We have encountered it several times in practice. [ChangeLog] Introduced new property Rule.requiresInputs Change-Id: If42ab347fb8e47b9117ac48fe3ce1b228566e0d8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add product dependencies to ResolvedProduct::modulesChristian Kandeler2017-06-302-3/+14
| | | | | | | | Otherwise, Export items would not be first class modules, because their properties would not be available in the depending products. Change-Id: Ieb50ffdf2a8c8b37408278f71d8ddfb058bf1bef Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge "Merge 1.8 into master"Christian Kandeler2017-06-263-0/+27
|\
| * Merge 1.8 into masterChristian Kandeler2017-06-233-0/+27
| |\ | | | | | | | | | Change-Id: Ie41cb55eb3cd78507ecde13ae72f9cb2bfd92c9c
| | * Executor: Do not convert error objects into stringsv1.8.1Christian Kandeler2017-06-223-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Command line users do not see a difference, but for IDE users it is important that we keep error message and code location separate in the ErrorInfo objects we hand out via the API. Task-number: QBS-1151 Change-Id: I4aacf2f32ee535c2d37da3d615ab78e2777a351a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | Add XFAIL-ing autotest for newly discovered bugJoerg Bornemann2017-06-263-0/+30
|/ / | | | | | | | | Change-Id: I3d3c21c5cedf62e650ee8238acf6495746b1fb9d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Autotests: Provide a means to specify the timeout via the environmentChristian Kandeler2017-06-223-4/+12
| | | | | | | | | | | | | | | | There are some exceedingly slow test machines for which sometimes even our generous default timeout is not enough. Change-Id: I278f3e3c6c85ed65ba24312e0788aa4bfa323dd2 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Move the buildgraph, language and tools tests into the proper locationsJake Petroules2017-06-2213-28/+3800
| | | | | | | | | | | | | | Also export necessary symbols that they need. Change-Id: I3023893a3da82cf0d86b0d08df38943db867cf3a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Add XFAIL-ing autotestChristian Kandeler2017-06-225-0/+77
| | | | | | | | | | | | Task-number: QBS-1113 Change-Id: I2ad8374806fd7ee3d7aed51409753b0f20a702ff Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix tests with older versions of Apple ClangJake Petroules2017-06-214-0/+9
| | | | | | | | | | | | | | Amends and fixes a regression introduced in 4551d11. Change-Id: I8014c8bfb82c389d4ae741f868be45e420e327ca Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix test linking on older macOSesJake Petroules2017-06-211-0/+3
| | | | | | | | | | Change-Id: I61f67951a76e7d5e4922dd35fa979f0bb39096f6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Remove Qt dependency from some tests in tst_api where it's easy to do soJake Petroules2017-06-2010-22/+26
| | | | | | | | | | | | | | | | | | | | | | | | These tests aren't testing actual "Qt" functionality, so don't let the presence/absence of Qt influence the results. The rest of the tests that depend on Qt actually *are* Qt-specific and should go into their own test suite in a separate patch, or need to be refactored/split in order to properly separate out the dependency. Change-Id: I733ec8e9b0cc261f7976f97cab09fb21fe36cd34 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Remove unnecessary Qt dependency from jsextensions-processJake Petroules2017-06-203-10/+35
| | | | | | | | | | | | | | | | | | This was the only test remaining that relied on Qt. Remove the dependency so that the qbs_autotests profile is allowed to be a "pure" one. Change-Id: Ic61b6d9c572aaa265fd176d484d416890431d795 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix Xcode and Android probesJake Petroules2017-06-202-2/+2
| | | | | | | | | | | | | | | | The second parameter to relativeProductBuildDir is the multiplex configuration ID now, not the profile... so don't pass the profile name. Change-Id: I9cbf020a95e36be10c70a7ea6f23fcaa33ffe981 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Extend TestBlackbox::pchChangeTrackingJoerg Bornemann2017-06-206-4/+25
| | | | | | | | | | | | | | | | | | The stable header file pch.h is force-included in every source file. Check that changing pch.h invalidates every obj file, even those whose cpp file does not explicitly include pch.h. Change-Id: Icfa4654dffbb6be7e972d899fcedbc4519a6c71d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Collect cpp.[weak]frameworks from library dependenciesJoerg Bornemann2017-06-163-0/+16
| | | | | | | | | | | | | | | | | | | | When depending on a static library that needs a macOS framework, we should automatically link against that framework, like we do with other kinds of libraries. Task-number: QBS-1129 Change-Id: Ibe20d874b0baba5c78ef13ad6961b5812ecd8918 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Clean up TestApi::buildProject(static library dependencies)Joerg Bornemann2017-06-161-16/+3
| | | | | | | | | | | | | | | | | | The Export item in the project file adds the external lib dependencies to the dependents of static lib "d". It was needed before we correctly handled library dependencies (c14a8982). Change-Id: Ic63a2c6afdd9568581f87da81747cdc287bba9cb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.8 into masterChristian Kandeler2017-06-161-0/+35
|\| | | | | | | Change-Id: I9d2f3f3ec834a1dfc4069258d2e58b9130156ec8
| * Make sure qcc handles response files properly for linkingJake Petroules2017-06-141-0/+35
| | | | | | | | | | | | Task-number: QBS-1143 Change-Id: I588412c269222419cecc3394f4588a4269eb3a52 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | API: Allow synchronous retrieval of build graph dataChristian Kandeler2017-06-143-0/+41
| | | | | | | | | | | | | | | | This is needed to import builds into Qt Creator. Task-number: QBS-1059 Change-Id: I8a1b226d3f0044c7e90a61d195796a1e8be9a9de Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Simplify the Java compiler scanner toolJake Petroules2017-06-131-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous attempts to overcomplicate this were counterproductive. The short of it is that the Java compiler backend can generate additional class files by way of transforming more complex language constructs into simpler ones, which occurs AFTER the parsing stage. This means that the source code parsing approach cannot work at all, since the list of outputs depends on the compiler internals rather than solely on the structure of the Java source code. The source code parsing approach was advised against by a JDK engineer who suggested alternative approaches. Unfortunately, this patch "breaks" dry-run builds since dependencies may not present when building Java source files... which is why this became overcomplicated in the first place. TypeScript has the same issue, which would be even more challenging to "solve" in a similar way as I tried to "solve" the dry run issue for Java. Task-number: QBS-1069 Change-Id: I8cef2268cd8845eda9f098e90decb81a40b2ab9c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Adapt autotest for modules prefixJake Petroules2017-06-131-1/+1
| | | | | | | | | | Change-Id: Ie7b353c4aa6f75b5e794e8205e210b3a4c348352 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Add support for building macOS disk imagesJake Petroules2017-06-1217-0/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows users to build drag 'n' drop installers with custom backgrounds, volume icons, and icon layouts. Unlike other solutions, disk images with these features can be built without any reliance on AppleScript, Finder, or a graphical login session, making it (mostly) reproducible and CI-friendly. .DS_Store files and their contained alias and bookmark records (which control the mounted disk image's appearance in the Finder) are written on-demand based on qbs properties defined in the project file, as well as the Carbon LPic, TEXT, styl, and RTF resources used for embedding a license agreement prompt. Task-number: QBS-416 Change-Id: I95431e21becc3bea075a1468d5271a41c38bbd04 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Autotests: Fix TestBlackboxApple::assetCatalog()Christian Kandeler2017-06-121-1/+1
| | | | | | | | | | Change-Id: I43546ce7458ce2e9dcbc5b2f932bb418bf4dd229 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix "separateDebugInfo" autotestChristian Kandeler2017-06-121-6/+24
| | | | | | | | | | | | | | There is no cpp.dsymUtilFlags with MSVC. Change-Id: I86236df57cf7da4c29b57fc575d4f3e84f17a82a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix race in qmake buildJoerg Bornemann2017-06-122-0/+2
| | | | | | | | | | | | | | | | | | | | | | The five blackbox tests use the same Q_OBJECT header file and therefore must not have a shared MOC_DIR. This fixed random build failures on Windows. This amends 5bfef74f from the 1.8 branch. Change-Id: Ia7bb4730c0b29c1de4c5f7373068f974ab67bf03 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>