aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Fix race condition in API test.Christian Kandeler2014-08-141-0/+2
| | | | | | | | | | The waitForFinished() function will run indefinitely if the job has already finished. This can happen in the projectLocking test, which calls the function for two jobs, but cannot know which one of them will finish first. Change-Id: I44c3e0550c0a287d96b0a79a9064455ecaaf7437 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix autotest on Windows.Christian Kandeler2014-08-082-1/+4
| | | | | | | Library symbol export problem again. Change-Id: Icd728dd07d2502b9a96b14a77f03020e6cffb303 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix --changed-files functionalityJoerg Bornemann2014-08-061-1/+0
| | | | | | Task-number: QBS-660 Change-Id: I6cc960c358b23a6ee38f2533334ca2c7cd8cdf33 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* enhance TestBlackbox::changedFilesJoerg Bornemann2014-08-063-4/+46
| | | | | | | | | | | It makes a difference whether we start from an initial build with or without the --changed-files option. An initial build without the --changed-files options followed by an incremental build with --changed-files unveils QBS-660. Task-number: QBS-660 Change-Id: Iee8466dd203bed01cf053c8eb78d7b960f20a035 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Add autotest for QBS-559.Christian Kandeler2014-08-065-0/+45
| | | | | | | | | This bug was fixed somewhat accidentally, so make sure it can't creep back in. Task-number: QBS-559 Change-Id: I3f85676f77cbc50b67f226810137860a7733fc6b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* multiplex rules now always see all inputsJoerg Bornemann2014-08-011-1/+0
| | | | | | | | | | | | | Multiplex rules now always see all inputs they're interested in and not only the compatible inputs that are out of date. Also, we do not need to re-use transformers, because that's a fruitless optimization attempt that complicated the code. Eventually, we're able to remove the hard-to-grasp "regenerating transformer" block. Task-number: QBS-645 Change-Id: I86dd307ee6ffa95baddd4e49307f0c1816e29901 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* add test for dynamic multiplex rule inputsJoerg Bornemann2014-08-016-0/+48
| | | | | | Task-number: QBS-645 Change-Id: Ib14533084c575d91cc937ca1f7e05145c06b108f Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Autotests: Make "copy and touch" operation atomic.Christian Kandeler2014-08-014-30/+26
| | | | | | | | | On Windows, QFile::copy does not update the timestamp on the target file. This fixes the "projectInvalidation" API test on that OS. Change-Id: I01c232de0f4e5e9bc5d2d28c24d5fb5516a58ca3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Invalidate project after certain unsuccessful re-resolving attempts.Christian Kandeler2014-07-306-1/+58
| | | | | | | Namely, if the build data has been mangled by the re-resolving attempt. Change-Id: Ibe020a6bda38a335f95e2d2cef4f37fac3199a7d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Tests: Move waitForNewTimestamp() function to shared file.Christian Kandeler2014-07-304-14/+17
| | | | | | | We want to use it in the API tests too. Change-Id: I8fad090ea98f67e50b7b2a8e3854c5b618172364 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* skip TestBlackbox::testAssetCatalog for OS X < 10.9Joerg Bornemann2014-07-241-0/+4
| | | | | Change-Id: I897d4743cefc4e70366c5599c5ba94aadfad70a3 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* API: Be smarter about adding files already matched by wildcards.Christian Kandeler2014-07-233-7/+45
| | | | | | | | | | | The project file does not need an update in this case. Actually, that would even lead to an error on the next project resolving, as the file would then be listed twice (once explicitly and once matched by a pattern). Task-number: QBS-653 Change-Id: If56969c36d1bba3f9194621690c2e1f25229ee9e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add autotest for tracking wildcard-related changes.Christian Kandeler2014-07-233-0/+29
| | | | | | | | Namely, adding and removing files matched by patterns. This does not seem to be explicitly tested anywhere yet. Change-Id: I6d7b79500ee9e7375f22537da5db6a72057bbdee Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Allow qbs.endianness to be undefined.Jake Petroules2014-07-221-2/+0
| | | | | | | If the property IS defined, it still must be in [big, little, mixed]. Change-Id: I77d64580d1dcce8ad027500ee8e394bf05d3d961 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix build on platforms != OS XJoerg Bornemann2014-07-221-0/+2
| | | | | Change-Id: Ie8f2226c7d9fe69e6c3842bbace8942674c6a959 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Add support for compiling Interface Builder storyboards.Jake Petroules2014-07-224-1/+701
| | | | | | | | As a side effect, some capabilities introduced here also apply to XIBs. Task-number: QBS-466 Change-Id: I27eaf1a9a73ef25475b4f6b2bc971dcd941b6371 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add support for compiling Xcode asset catalogs.Jake Petroules2014-07-226-0/+57
| | | | | | Task-number: QBS-389 Change-Id: I2d93a55228c6ada801ed889404fac753182b82f6 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* make it possible to set module properties on artifacts in outputArtifactsJoerg Bornemann2014-07-223-1/+15
| | | | | | | | | | | | | | | | | | Example: outputArtifacts: { return [{ fileTags: "blubb", filePath: "x", cpp: { includePaths: "mydir" defines: ["BLA", "BLUBB"] } }] } Task-number: QBS-646 Change-Id: I3defa656e1a5b10fe56e4bbba7c354612144552c Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Add support for compiling OS X icon sets.Jake Petroules2014-07-219-0/+49
| | | | | | Task-number: QBS-493 Change-Id: Ie6e4a00f672ce4305f03e00ec0b0b7ebcbd942c3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* API: Make the ability to update project files optional.Christian Kandeler2014-07-184-1/+9
| | | | | | | | | | | | This is the functionality that allows callers to add files to groups etc. Unfortunately, the QML/JS rewriter we use for this purpose pulls in the Qt GUI module, which results in unnecessary library dependencies if one only wants to use the command-line frontend. Therefore, allow this feature to be compiled out. Task-number: QBS-565 Change-Id: Ic134ff9cf37bd552ad493b388c05bcece983fd65 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix up-to-date check wrt missing file dependenciesJoerg Bornemann2014-07-185-0/+29
| | | | | | | | | Missing file dependencies (e.g. header files that are not part of the project) must trigger a rebuild their dependents. Change-Id: I502e696d886c86a503e8950ae60254075f7e9415 Task-number: QBS-631 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* invalidate artifacts if a dependency is removedJoerg Bornemann2014-07-188-0/+50
| | | | | | | | | | | Artifacts must be invalidated if a dependency is removed. Consider a foo.cpp that includes bar.h. If bar.h is removed from the project, then we must recompile foo.cpp to trigger the compile error that stems from the wrong include. Change-Id: Ifc2bc3085be553f87685a17c5ff05273daa6579c Task-number: QBS-631 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix calculation of added/removed artifactsJoerg Bornemann2014-07-171-1/+0
| | | | | | | | | | | We kept lists of added and removed artifacts in ProductBuildData. It was never quite clear when to invalidate those lists, which led to QBS-635. Instead we let the RuleNode decide which artifacts it considers as "added or removed for this rule". Task-number: QBS-635 Change-Id: I390e0ab775c695045c6e91ade3ac7326692cb314 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Take product type changes into account when change tracking.Christian Kandeler2014-07-164-0/+26
| | | | | | | | | | This property is special: We cannot just test for relevance by checking whether it is used in any transformers, because changing it can cause new transformers to get pulled in. Task-number: QBS-650 Change-Id: If18495b47c7238fc8a1256146f4e935ce9655b18 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add missing metatype registration.Christian Kandeler2014-07-163-0/+27
| | | | | | | | The code path where this is relevant has apparently never been taken, so add an autotest as well (and fix the wording of the error message). Change-Id: I314f1cb888264d30920a58f4e9cbbbf01fbcc4e6 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix "build graph locking" autotest for Qt < 5.1.Christian Kandeler2014-07-161-0/+3
| | | | | | | | The locking is not implemented there, so we actually expect a failure in that case. Change-Id: Ie70aa2318915223b968f78015a796dcd390fb1c5 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Speed up project re-resolving by skipping the loading from file.Christian Kandeler2014-07-161-38/+29
| | | | | | | | When re-resolving an existing project, the build graph already exists in memory and does not have to be read from disk. Change-Id: Icf5cf7396a859d4ee1c495b8cc4fa7a1ee61ff1d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* deprecate Artifact.fileName in favor of Artifact.filePathJoerg Bornemann2014-07-1620-28/+28
| | | | | | | | This property is actually a file path, not a mere name. Task-number: QBS-579 Change-Id: I04e8f03eac97b5f86fe743a4923888a3d2a82c5d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Put a system-wide lock on the build directory.Joerg Bornemann2014-07-163-1/+35
| | | | | | | | | | | | | So that two qbs instances can't overwrite each other's build graphs. In practice, this is probably most relevant for IDEs, as these hold a build graph for potentially long periods of time. Facilitates QLockFile that was introduced in Qt 5.1. For older Qt versions, no locking happens. Task-number: QBS-162 Change-Id: Ib598617fb1742eb57b6a017f40b9631d1d54e627 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add and make use of convenience item QtGuiApplication.Christian Kandeler2014-07-147-14/+7
| | | | | | | | | | Using this item, building a Qt gui app against a static Qt will work out of the box. Also add the less useful QtApplication for completeness. Change-Id: Idca1dbd3085659ebaf563f7df89f73b9daaf7001 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove qbsSettings() functionJoerg Bornemann2014-07-093-25/+25
| | | | | | | | Don't use a special Settings shared pointer. This simplifies the code a lot. Change-Id: I974cf9634d1760633744b1ed3cc18a9458ae2caf Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Allow empty submodules property in Depends item.Christian Kandeler2014-07-093-0/+15
| | | | | | | | | | | | | | | It just means that no dependency should be pulled in by this item. Useful for this kind of thing: Product { Depends { name: "Qt" submodules: theQtSubModulesINeed } property stringList theQtSubModulesIneed // Can be empty. } Change-Id: I8e500c3acfa4374be9005fcf349c0417ad47a76e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Make it possible to set profiles per product.Christian Kandeler2014-07-027-12/+155
| | | | | | | | | | | Use case 1: Build product A for architecture X and product B for architecture Y (e.g. host tools vs target libraries). Use case 2: Build product A for architectures X and Y and product B only for architecture X (e.g. Android multi-arch packages). Change-Id: I2eb721c37cdd12c298ee12bad60e21e94b04676b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Merge remote-tracking branch 'origin/1.2'Joerg Bornemann2014-07-023-0/+0
|\ | | | | | | Change-Id: I9d5874b3867d3b366e418ae101c25b518053b00a
| * Remove executable bit from non-executable files.v1.2.21.2Jake Petroules2014-06-163-0/+0
| | | | | | | | | | | | Task-number: QBS-622 Change-Id: I080cff88ffa91fcb55ff8340847b684901ada44b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Yet another timeout increase for the "infinite loop" autotest.Christian Kandeler2014-07-021-2/+2
| | | | | | | | | | | | | | | | Even slower machines have appeared. Task-number: QBS-628 Change-Id: I1e54a50265db4ef924d83e3485f8681fe3452480 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Make sure to remove empty parent directories when removing artifacts.Christian Kandeler2014-07-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | We create these directories when we create the artifacts, so we have to remove them when the artifacts are removed. For safety, we do not do that for artifacts located outside of the build directory. Task-number: QBS-630 Change-Id: I4da91a2b940ddea6837cb881bf3dc777b71fe702 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Correctly handle overriding of file tags via an empty list.Christian Kandeler2014-07-024-0/+16
| | | | | | | | | | | | Task-number: QBS-633 Change-Id: I4bf750ff94d6fae38fb3fdb49de265caddcd789e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Do not lose rescuable artifact data after an incomplete build.Christian Kandeler2014-07-025-0/+113
| | | | | | | | | | | | Task-number: QBS-630 Change-Id: Ib69c541a6c1e228b1ad3c06da51d905194ed10d8 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Add failing autotest for QBS-635.Christian Kandeler2014-06-265-0/+20
| | | | | | | | | | | | Task-number: QBS-635 Change-Id: I30dc4b0694efa0417d340a75368b3af1eb117daa Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* | fix appWithoutSources test on OS XJoerg Bornemann2014-06-161-0/+1
| | | | | | | | | | Change-Id: I6319c2fad4c5aaa81d6942d111663d93951bc18a Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* | fix build directory checks in autotestsJoerg Bornemann2014-06-161-2/+2
| | | | | | | | | | | | | | Those were broken by 1074c99e. Change-Id: Ia2b847d938985f21c8f60bb50fd3f91ffdf02b7b Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* | Merge remote-tracking branch 'origin/1.2'Joerg Bornemann2014-06-132-2/+12
|\| | | | | | | Change-Id: Ic33a2440fae27b4ada5b950f3a411916e8ac17f7
| * sanitize stdout/stderr output in blackbox testJoerg Bornemann2014-06-132-0/+9
| | | | | | | | | | | | | | | | | | | | On Windows the CR characters that were in stdout/stderr led to very unclean output on the console and in Qt Creator. We're removing those in the runQbs method now. Change-Id: I4bef7bb7221bd6f656e5e7480c7a3e0e7ddb44fb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
| * fix TestBlackbox::erroneousFiles on *nixJoerg Bornemann2014-06-131-2/+3
| | | | | | | | | | | | | | | | The error message will contain '/bin/ls' and not just 'ls' unlike on Windows. The test now understands regular expressions. Change-Id: Ib37201744d192d6cd53c350107985532c3633532 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* | Merge remote-tracking branch 'origin/1.2'Joerg Bornemann2014-06-103-0/+42
|\| | | | | | | Change-Id: I603430421156e4d23451a7a4ba0f884d6556f89a
| * yield error if Command.workingDirectory doesn't existJoerg Bornemann2014-06-103-0/+42
| | | | | | | | | | | | | | | | | | Otherwise some command might clutter the user's current working dir. Task-number: QBS-607 Change-Id: Id263481d1a615b9c66753e11b271441d4bd004b1 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* | fix TestBlackbox::usingsAsSoleInputsNonMultiplexedJoerg Bornemann2014-06-062-3/+3
| | | | | | | | | | | | | | | | Do not add bool to string, and fix the output file names of the custom-plus rule. Change-Id: If5fec2adc43dcf9639c3fd56c5d84693f3d6bc78 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Fix the ability to use WiX localizations.Jake Petroules2014-06-022-1/+2
| | | | | | | | | | | | Task-number: QBS-604 Change-Id: I028193ad6c5e0bfb4755290ffcd48fe108f6d2b1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | introduce cpp.entryPointJoerg Bornemann2014-06-021-4/+1
| | | | | | | | | | | | | | | | | | Set cpp.entryPoint to specify the entry point symbol for an executable or dynamic library. Task-number: QBS-602 Change-Id: I83e7c13b4ab7675a1cfa0cc8a2234cba0f850b3d Reviewed-by: Jake Petroules <jake.petroules@petroules.com>