aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Fix symbolLinkMode autotest on macOSChristian Kandeler2018-03-131-12/+7
| | | | | | | | An expected failure was inadvertantly "fixed" by a5f2a7820f. Disable the run environment setup for this autotest. Change-Id: I34032ae0bdf51e6bc80ac1902df1ab8e31ed1464 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* vcs module: Make sure the git meta data directory is absoluteChristian Kandeler2018-03-123-4/+10
| | | | | | | | | | git rev-parse --git-dir prints a relative or an absolute path, depending on whether you call it from the repository base directory or not. Our code now accounts for that. Change-Id: Iac5eeb0fc55fe83d6c588efbcf97cab6786a4f89 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Ola Røer Thorsen <ola@silentwings.no>
* Fix exports from multiplexed productsChristian Kandeler2018-03-093-1/+59
| | | | | | | | | | While we did set up the dependencies between multiplexed products correctly, the *module* (i.e. Export item) that we pulled in was always the same one and corresponded to the wrong product variant in most cases. Change-Id: If42cf7e946689259c7433d81fd35d8798919eb15 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix qtquickcompiler support for Qt >= 5.11Joerg Bornemann2018-03-061-0/+1
| | | | | | | The functionality of qtquickcompiler is now in qmlcachegen. Change-Id: I70c45f9db72895e2146cbf4bb7902b8db294626c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Qt templates: Fix detection of QtQuick compilerChristian Kandeler2018-03-051-0/+4
| | | | | | | | | In Qt 5.11, the features/qtquickcompiler.prf file is always present, even if the QtQuick compiler is not. Task-number: QBS-1299 Change-Id: Ibc7f925f1b1753d870ddad939fd510637c3b7642 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Guard QScriptEngine's creation/destruction with a mutexJoerg Bornemann2018-02-289-1/+61
| | | | | | | | | | | | | | | | | | When building multiple configurations in one go we create one QScriptEngine per configuration, each in its own thread, but nearly at the same time. It turns out that QScriptEngine's creation/destruction is not thread-safe, which leads to all kinds of interesting effects in the multiple configurations case. We fix this by guarding creation/destruction of QScriptEngine with a mutex. Task-number: QBS-1308 Change-Id: Ie01733d5943f1fb89e1d25344c4ffa998095e394 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add a location to errors in conditions of Properties itemsChristian Kandeler2018-02-231-1/+2
| | | | | | | These can be exceedingly difficult to debug otherwise. Change-Id: Ie3bc42fbd60e11be105fc23624c77a623dc5f1aa Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Make autotests mingw-friendlierChristian Kandeler2018-02-226-62/+33
| | | | | | | | | | Some autotests need to execute processes built earlier in the same test. With mingw, these need to find libgcc at runtime. Make sure it is available, either by using "qbs run" or by adding a dependency on the cpp module in the product that runs the application. Change-Id: I7f000c3d604a3412049a271b53b5fed4cc7fc54e Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Darwin: Fix lipo rulesChristian Kandeler2018-02-221-0/+32
| | | | | | | | | | - We must activate these rules only on the product that is the actual aggregator. - The lipo command must only consider artifacts of the multiplexed variants of the same product. Change-Id: I25dc42cb53d84d85786b2d7ff96297b7fd58a90d Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Only use fallback values for the -std= command line option when neededJake Petroules2018-02-211-0/+1
| | | | | | | | | | | | | | | Instead of always using the fallback value, we instead always use the standard value unless we know we're running an older toolchain which does not support it. This alleviates the potential for differing behavior in newer versions of compilers which may attempt to remain compatible with earlier drafts of corresponding standards. [ChangeLog] Always use standard values for -std= when possible Change-Id: I61ff3ecd863caa24cb8fb54500e62dc310a2af02 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* RunEnvironment: Add safety check for API mis-useChristian Kandeler2018-02-213-0/+36
| | | | | | | | | It makes no sense to try to run a disabled product. Task-number: QBS-1306 Change-Id: I07e36bc8f787d702ed9caa21972537e588db57e8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Do not apply file tags filter to target artifacts of modulesChristian Kandeler2018-02-192-0/+8
| | | | | | | These do not conceptually belong to the product. Change-Id: Ic55cf246fe38ba7ad03563b5f67a8622810dad7d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Android autotest: Get the jar file path from qbsChristian Kandeler2018-02-162-1/+4
| | | | | | | There is no guarantee that we find it in the environment. Change-Id: I58281b5936e0ddad51cbdbe0833f62c4dbb42c1d Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Autotests: Fix function that figures out the object file extensionChristian Kandeler2018-02-161-3/+5
| | | | | | | It did not know about qbs.toolchainType. Change-Id: I00bcd5518f81a65fa49153b75f1fd2fb69d37fd3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix race conditions in innosetup, wix and nsis modulesChristian Kandeler2018-02-161-8/+10
| | | | | | | As first attempted in 7f6ec1cc27. Change-Id: Ib76dbdfc0a60b27d38d93a22c9556d54f07a3dac Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Check product and project names in command-line property overridesChristian Kandeler2018-02-153-0/+75
| | | | | | | | Users should get feedback if they mistyped a product name, for instance. Task-number: QBS-1288 Change-Id: Icb57490d896d21c5ff9ed3940b53d9b18fe00a30 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix connection to rules of dependenciesChristian Kandeler2018-02-153-0/+86
| | | | | | | | | | | ... for the case that auxiliaryInputs or explicitlyDependsOn contains "installable". They must be considered in addition to inputsFromDependencies, because they also match target artifacts of dependencies. Change-Id: Ib960001a8e67034d6d1382bacc385bdcd9ddfb99 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Qt.scxml: Add support for the --statemethods optionChristian Kandeler2018-02-122-0/+6
| | | | | | | | | | | | | Also add an undocumented property to add arbitrary options. This one acts as an emergency fallback in case we miss a new option in the future. Task-number: QBS-1295 Change-Id: I0ba81325d6975d8bb25cbd397c9daaaa12f685c2 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Andreas Bacher <andreas.bacher@meon-medical.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Make driverLinkerFlags autotest more robustChristian Kandeler2018-02-091-1/+1
| | | | | | | | It used to fail when executed from a directory that had "-c" in the name. Change-Id: Ib779082b55236843988c236aa8479265169bbec7 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Officially provide "c++17" as possible value for cpp.cxxLanguageVersionChristian Kandeler2018-02-072-2/+9
| | | | | | | | The standard is out now. Task-number: QBS-1020 Change-Id: Ie8249e1c860d5ebc2f9dadf02551544ddaaf2868 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Make clangdb autotest self-contained when using a mingw profileChristian Kandeler2018-02-052-4/+13
| | | | | Change-Id: I6807c55dd9115c9bb0be2aa4d5b7adf5c5e40853 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Java: Adapt to Java 9 changesChristian Kandeler2018-02-051-3/+4
| | | | | | | | | | | | | | | - tools.jar and rt.jar are gone - The -bootclasspath option is not allowed when targeting Java 9 - JavaCompiler.isSupportedOption() (erroneously?) returns 1 instead of 0 for -Xlint - version number related changes: - major version has jumped to 9 - javac prints the version number to stdout rather than stderr - version number no longer contains a forth component - The -source and -target options take only the major version Change-Id: I0b23c8868db7aeaa06785ee43c1efd9fcb1bc9d2 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Fix Java autotestChristian Kandeler2018-02-051-1/+4
| | | | | | | | The default JDK on the system cannot be generally expected to support all known language versions. Change-Id: Ia224150977da651257874801d6bc9cba852521d6 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge 1.10 into 1.11Christian Kandeler2018-01-3110-14/+84
|\ | | | | | | Change-Id: I2d6cac6f24144c2c7e463ef7eed2e2c109f50bbf
| * Fix SOFT ASSERT for parametrized dependencies in Export/Module itemsv1.10.11.10Joerg Bornemann2018-01-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The SOFT ASSERT was triggered, because the Depends items in Export/Module had the type ModuleInstance instead of ModuleParameters. Move the assignment of that item type to ItemReaderASTVisitor instead of adjusting it in the ModuleLoader, because this ensures that we don't have to traverse prototypes in the adjustment procedure. Task-number: QBS-1287 Change-Id: Ie1a1080d40b8bebe5c205f8b34298469cde5bd46 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Fix parameter extraction for Depends items within Export/Module itemsJoerg Bornemann2018-01-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parameters of Depends items within Export items were ignored. Project { Product { name: "foo" Export { Depends { name: "dep"; cpp.link: false } // dep } } Product { name: "bar" Depends { name: "foo" } } } The instance of foo in bar has an Depends child depinst. The item depinst was created by createChildInstances and is an empty item with the prototype dep, which is the Depends item in foo's Export item. Thus, extractParameters must look up properties in the deepest prototype (dep), not in the Depends item itself (depinst). Unfortunately, this fix triggers SOFT ASSERT: varValue in ../../../../1.10/src/lib/corelib/language/evaluatorscriptclass.cpp:574 which will be fixed separately. Task-number: QBS-1287 Change-Id: I56b5464aad2578bb5ddab2e831fc607d6634ac8d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Add failing test for QBS-1287Joerg Bornemann2018-01-315-9/+42
| | | | | | | | | | Change-Id: I6a3222228f822b88d860b5036f459f1a732dc6ac Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Clean up the list of file dependencies before buildingChristian Kandeler2018-01-305-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After adding an external file dependency, we would never remove it from the global list again, meaning the look-up table would contain stale entries if an external header file was moved around. Because we still checked the status of the artifact-local list of dependencies, the result was that in such a situation, the files including such a header would get recompiled on every build. [ChangeLog] Fixed constant rebuilding after moving an external header file. Task-number: QBS-1285 Change-Id: Id764da7485dd540f2ff64bcd890e43723f18e6cd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix android autotest on WindowsChristian Kandeler2018-01-261-0/+2
| | | | | | | | | | | | | | We failed to account for the carriage returns in the jar output. Change-Id: I2061a8ea306c64ce44039472f2840f71898c2097 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Merge 1.10 into 1.11Christian Kandeler2018-01-193-0/+59
|\| | | | | | | Change-Id: Iae805216e202e582923a70733caa842e8070cc7e
| * ModuleLoader: Fix order of module mergingChristian Kandeler2018-01-173-0/+59
| | | | | | | | | | | | | | | | | | | | Dependencies must be merged before their dependents, because the merging process for the former sets up data to be consumed by the merging process for the latter. Task-number: QBS-1275 Change-Id: Ide9146add79bf2b4fcf80d7ce95ac1d9d4ac20b2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Replace another find_if by none_ofJoerg Bornemann2018-01-181-4/+5
| | | | | | | | | | Change-Id: I68445c362386c6c310ab098ce5ea6780c1232e42 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge remote-tracking branch 'origin/1.10'Joerg Bornemann2018-01-176-0/+107
|\| | | | | | | | | | | | | | | | | Conflicts: src/lib/qtprofilesetup/qtprofilesetup.cpp src/lib/qtprofilesetup/templates/QtModule.qbs src/lib/qtprofilesetup/templates/core.qbs Change-Id: I342608a47f1a90b53eb12cc14fc3ff116063d15f
| * GCC: Reorder prefixHeaders and precompiled headersArrigo Zanette2018-01-086-0/+107
| | | | | | | | | | | | | | | | Prefix headers should follow precompiled headers on the gcc command line. Testcase added. Change-Id: I3dfba8cae9c894932acce5c0a67f16d7d072c94b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix id pointer of base itemsJoerg Bornemann2018-01-175-8/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the following example the name of the derived product should be "derived", but it was "base". ---BaseProduct.qbs--- Product { id: baseProduct property string foo: "base" name: baseProduct.foo } --derived.qbs-- BaseProduct { foo: "derived" } The id baseProduct still pointed to the Product item originally imported from BaseProduct.qbs. Fix the item pointers in the base id scopes when handling item inheritance. Task-number: QBS-1016 Task-number: QBS-1262 Change-Id: Id11b98aa6780f8bbbda86fda5a7d11a0e006d889 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Executor: Add missing check for module target artifactChristian Kandeler2018-01-122-0/+7
| | | | | | | | | | | | | | | | Such files are not to be matched against Rule.inputs. This part was forgotten in 8ca922793f. Change-Id: I0a01b3642f4a16c09d189e8c2228205fd0e9962b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Properly take the --dry-run option into account in the "run" commandChristian Kandeler2018-01-121-0/+8
| | | | | | | | | | | | | | Do not try to execute the virtual binary. Change-Id: I19b0a9e7600b33cb42c4ab60f689dd4c3329930b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Simplify some autotestsChristian Kandeler2018-01-084-28/+6
| | | | | | | | | | | | | | ... by using "qbs run" instead of manually executing the applications. Change-Id: I548f7721acff3aac6644944ad7436ad8bcfa1867 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | ModuleLoader: Add missing base values when merging Export itemsChristian Kandeler2018-01-082-1/+5
| | | | | | | | | | | | | | | | We forgot to do this for alternatives, meaning that in Properties items in Export items, "base" would not be properly set up. Change-Id: Ieafe4933696074469aaf497d4e153ca92fa8f73b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Merge 1.10 into masterChristian Kandeler2018-01-056-7/+44
|\| | | | | | | Change-Id: I29a74f96381a1b77c6cb1959547314786690baa4
| * Fix build with Qt 5.6Christian Kandeler2018-01-031-1/+1
| | | | | | | | | | Change-Id: I6a8ff3557bbaa5e38f3df0f4334e5d0331349565 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * lexyacc test: explicitly declare yylvalJake Petroules2018-01-021-0/+1
| | | | | | | | | | | | | | | | Apparently this is not declared in y.tab.h on all platforms (such as Fedora). Change-Id: I1ae92a8cd415afaa623a34ac7765eb44e5235320 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Fix possible false negative in reproducibleBuild autotestJake Petroules2018-01-021-4/+6
| | | | | | | | | | | | | | | | | | | | | | We only need to guarantee that the object file contents are equivalent if we explicitly requested a reproducible build. This does NOT imply that a non-reproducible build is *guaranteed* to produce different object files. This is the case on Fedora systems as uncovered by that platform's Qbs packagers. Change-Id: I8e46610f08a8b0c2b59ff84da94e9529c030baba Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Fix convenience command-line override syntax for qbs propertiesChristian Kandeler2017-12-233-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | Users can write "qbs.xyz" instead of "modules.qbs.xyz", but we only applied that during module prototype loading, meaning that using that syntax (and only that syntax) would not override values set in project files, which was obviously quite confusing to users. Now the two variants behave exactly the same. Task-number: QBS-1244 Change-Id: Ie9c5de1ac42e33205b80335566e0721d61718947 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * Fix scopes of dependency parametersChristian Kandeler2017-12-231-3/+11
| | | | | | | | | | | | | | | | | | | | | | Only the values in Depends items of products had a scope, and that one did not allow to access module instances. Now the scope always is the surrounding item, which should be a sensible one in all contexts. Task-number: QBS-1253 Change-Id: Iedca2d98f82f71887373579f8e4dc91f057eded3 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Mark values that were set up as the defaults of built-in item propertiesChristian Kandeler2018-01-052-1/+2
| | | | | | | | | | | | | | | | | | | | | | There are several contexts in which we need to find out whether a property value of a built-in item is the default one that was created by us when initializing the item. Rather than using heuristics for that, we now set a flag on such values, so we can always get the correct information. Change-Id: Ieb0d87a423d6c6836a2c1d60ccf503fa0b4f801b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Internal::Set: use the size_type that is actually advertisedJake Petroules2018-01-032-12/+14
| | | | | | | | | | | | | | This gives better compatibility with STL anyways. Change-Id: Ie7f25b8ab8ccf4b50c7ad8e35f6dd4b5ca4cc4a2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ModuleLoader: Run property checks also for Module itemsChristian Kandeler2017-12-233-0/+14
| | | | | | | | | | | | | | | | The comments around the code that skipped these checks made little sense and were likely just outdated. Change-Id: I8ff714a4d717359dd8dde39b55a41d233f84fd08 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Merge 1.10 into masterChristian Kandeler2017-12-224-1/+26
|\| | | | | | | Change-Id: Iecddc2722d22d7c15d4b32efd676fa8e7c00e99f
| * qbs.Environment: Normalize key values on WindowsChristian Kandeler2017-12-223-0/+25
| | | | | | | | | | | | | | | | | | The names of environment variables are case-insensitive on Windows. Convert them to upper case when handing out the environment, so that users can count on the names being canonical. Change-Id: Iba2ce768b7cd22270dd2d240d15fc1a78915e3a7 Reviewed-by: Jake Petroules <jake.petroules@qt.io>