aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/api/tst_api.h
Commit message (Collapse)AuthorAgeFilesLines
* Executor: Do not convert error objects into stringsv1.8.1Christian Kandeler2017-06-221-0/+1
| | | | | | | | | | 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 failing autotest for linking static libs and dynamic libsJoerg Bornemann2017-03-031-0/+1
| | | | | | | | This test builds an application with the following dependencies: app -> staticlib1 -> dynamiclib1 -> staticlib2 -> dynamiclib2 Change-Id: I55cf507baf65b932ac008b17661cf85c04a0f7e9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add failing autotest for linking dynamic libs and static libsJoerg Bornemann2017-03-021-0/+1
| | | | | | | | This test builds an application with the following dependencies: app -> dynamiclib1 -> staticlib1 -> dynamiclib2 -> staticlib2 Change-Id: I1cd53d20eed7462ef8417ef61ce8e599bc0ecd8e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Rename dynamicLibs autotest to link-dynamiclibsJoerg Bornemann2017-02-261-1/+1
| | | | | | | This is consistent with other tests regarding linking. Change-Id: Ie444bca99f0b0385fb85c00927c89bbf18855bd1 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Give test project files consistent file namesJoerg Bornemann2017-02-231-1/+1
| | | | | | | | Having multiple project files named just "project.qbs" makes switching buffers harder in IDEs. Change-Id: I847c869292815cc534f903664eb01768f73286b1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Change style of #includes of Qt headersJake Petroules2017-01-041-2/+2
| | | | | | | | | | | | | | | | By using q<lowercase>.h headers, we become more bootstrap-friendly, as no full syncqt is required any more. In the same go, prefix all includes with the module name. This helps grep-based analysis of which parts of Qt are used and where. It's also consistent with Qt's public headers (where syncqt enforces the style). Testdata and examples are excluded from the change, as they are not relevant for bootstrapping. Change-Id: I9539b1d795e87fca6e5fc6c91acbb775b79208d9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Change tracking: Detect formerly missing source files being presentChristian Kandeler2016-12-141-0/+1
| | | | | | | | | This is only relevant for relaxed mode (i.e. in IDEs), where we don't throw an error when listed source files are missing. Task-number: QBS-1061 Change-Id: I4d044a5a317362abfe04e073f32bacfcf8f0e7e2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Re-display warnings when loading a stored build graphChristian Kandeler2016-09-301-0/+1
| | | | | | | | | [ChangeLog] Warnings encountered during project resolving are now stored and will be re-displayed when the project is loaded. Task-number: QBS-1011 Change-Id: I5fa04d3d537866212abbdf739b09a254843de473 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Recover from errors in referenced files when in relaxed modeChristian Kandeler2016-08-301-0/+2
| | | | | | | | An error in anything but the top-level file should still load the project. This improves the experience of IDE users. Change-Id: I607d2c96c6f51ead840b7f50701c167796af7d42 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Update license headersIikka Eklund2016-08-291-16/+14
| | | | | | | | | | Patch-set 1 includes *.h Every source file needs to have up-to-date license headers in order to pass ci. Change-Id: Ib6cf3ac47dfba6dff262fded44bc952aef3bda8b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* API: Take rescuable artifact data into account for project dataChristian Kandeler2016-08-221-0/+1
| | | | | | | | | Otherwise, information about generated artifacts will temporarily disappear when product build data has been invalidated after project re- resolving, which is annoying for IDE users. Change-Id: Idea2d03fba5a823256e95ce554a2f2f413e3d977 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Try not to emit bogus errors after real errors in relaxed modeChristian Kandeler2016-07-071-0/+2
| | | | | | | | | | | | | | | | | | In "relaxed mode", intended for use by IDEs, we try to continue project resolving as much as we can even when errors are encountered. Since that mode was not present from the beginning, some code does not deal well with the resulting state. This patch takes the following measures: - Do not call handleProduct() if an error already occurred for that product. We will disable it later anyway, so there is no need to try merging modules, running probes etc. - Add the base module to the item's list of modules only after resolving explicit dependencies. This fixes an ugly "assert" message that would appear with bogus dependencies in Export items. While it was technically harmless, it had the potential to worry users. Change-Id: Ie650314b08488b975569678b931fd670bb8f43ac Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge remote-tracking branch 'origin/1.5'Joerg Bornemann2016-06-081-1/+1
|\ | | | | | | | | | | | | | | Conflicts: doc/reference/items/transformer.qdoc share/qbs/modules/cpp/GenericGCC.qbs Change-Id: I45560834560019b18274c373c45651eb8aadd206
| * Replace 'the Qt build suite' with 'Qbs' in copyright notices.Jake Petroules2016-06-061-1/+1
| | | | | | | | | | | | Change-Id: I885d94bb14b325dc36767a840ebdb0be1fb59dd2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Use Qt5-style connectsOrgad Shaneh2016-06-071-3/+6
| | | | | | | | | | | | | | The heavy lifting was done by clazy. Change-Id: Ibb13c517567b1b32bbda6d26225454d1b003934d Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Do extensive validation on the value of qbs.toolchain.Jake Petroules2016-04-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | qbs now enforces the order of the items in the toolchain list, ensures that there are no duplicates, and ensures that all implied values are present in the list (for example, clang implies llvm implies gcc). Users can now rely on appropriate values always being present (like llvm, or gcc), and on the order of the toolchain list. Change-Id: I9abcee9265a8ac9539639128bb4b624353c155ec Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Merge remote-tracking branch 'origin/1.5'Joerg Bornemann2016-04-151-0/+1
|\| | | | | | | Change-Id: I08d6a8571d76346d7f71670b35899471f9a8c946
| * Do not throw exceptions from the RunEnvironment class.Christian Kandeler2016-04-071-0/+1
| | | | | | | | | | | | | | | | | | Apparently, this class was overlooked when we made the API non-throwing (or it was internal at the time). Task-number: QBS-952 Change-Id: I445436c1ddb3d815a20f44a87438b3cdbccfc156 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Add an additional check when applying rules.Christian Kandeler2016-03-211-0/+1
|/ | | | | | | | | | This one catches simplex rules where the same output artifact is associated with different inputs. Such outputs were silently overwritten before. Change-Id: I11cfeb6b4ef2541b202e34dd01e236a818dfdf14 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Add an option to require transformers to generate all declared outputs.Jake Petroules2016-03-091-0/+2
| | | | | | | | | | | | This ensures that a successful build cannot complete without all output artifacts of all rules and transformers in the project existing (unless they are marked alwaysUpdated: false). This is undesirable to enable by default due to the potential overhead, but can be a useful debugging tool and so is provided as an option. Change-Id: I46ee49e28cc06d5aff9a3cfd520f929fef4de3f8 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* API: Allow to retrieve the direct parents of a given artifact.Christian Kandeler2016-03-021-0/+1
| | | | | Change-Id: Ic463b4bee7cb16c0a4e92439bde59ba8ad047478 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Make it easy to redirect the commands outputs to files.BogDan Vatra2015-11-201-0/+2
| | | | | | Change-Id: I0516527408d44b8f78d8da1fc65cdf609babfbc6 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Sort declarations of test slots alphabetically.Christian Kandeler2015-07-271-4/+4
| | | | | | | If we want to keep them sorted, let's do it properly. Change-Id: I4c718508e51c0d05f9460068d635199cabc3d308 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Allow to attach properties only to selected (sub-)projects.Christian Kandeler2015-06-011-0/+1
| | | | | Change-Id: I04ff63af5055694854a8b015e7a317becdfb4d9e Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Don't assume that project.qbsSearchPaths must come from a project file.Christian Kandeler2015-05-211-1/+3
| | | | | | | | Can also be set on the command line. Task-number: QBS-810 Change-Id: I9907bdecd9be4b118d979b551fd66cf70b7dbc8b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Merge branch '1.3' into 'master'Christian Kandeler2015-01-281-6/+6
|\ | | | | | | | | | | | | | | | | Conflicts: doc/reference/jsextensions/jsextensions-general.qdoc src/lib/corelib/language/evaluatorscriptclass.cpp src/lib/corelib/language/evaluatorscriptclass.h Change-Id: Ic9b77b56e8fc8bf93e0a553930757de8c93fed22
| * Update LicenseEike Ziller2015-01-261-6/+6
| | | | | | | | | | Change-Id: I092fca9f950de1ba38826c33b155f86feae2770b Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Merge remote-tracking branch 'origin/1.3'Joerg Bornemann2014-11-031-0/+1
|\| | | | | | | | | | | | | Conflicts: tests/auto/api/tst_api.h Change-Id: I1f9cb9105f4ed2c428729810b7a7079d11e90957
| * Make information about commands available via the API.Christian Kandeler2014-10-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Users can supply a file path and a tag, and they will get the list of commands that are run to create an output file with the given tag from the given input file. This information is needed by Qt Creator. Change-Id: I36f92c200e78831733fccc4f7b5f54b8218d6311 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/1.3'Joerg Bornemann2014-10-271-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/lib/corelib/tools/version.h tests/auto/api/testdata/disable-product/project.qbs tests/auto/api/testdata/disabled-product/disabledProduct.qbs tests/auto/api/testdata/disabled-product/main.cpp tests/auto/blackbox/tst_blackbox.cpp tests/auto/blackbox/tst_blackbox.h Change-Id: Ic45aa1b70946fd3e037ecce56f1cd7c414ca832c
* | Merge remote-tracking branch 'origin/1.3'Joerg Bornemann2014-10-161-7/+8
|\| | | | | | | | | | | | | | | Conflicts: qbs_version.pri version.js Change-Id: I645b2f37bae9d36d4bca54b267d57df8b0b7fd21
| * complete license header updateJoerg Bornemann2014-10-161-7/+8
| | | | | | | | | | Change-Id: I2c7ea3242e5ce244e8feee01c0f8a0b0651fa0d4 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* | Turn some blackbox tests into API tests.Christian Kandeler2014-08-141-1/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | Different test executables can run in parallel, whereas the functions within one test executable cannot. This means that tst_blackbox is currently a bottleneck, as it takes an order of magnitude longer than all other tests combined. We therefore turn a number of blackbox tests into API tests (most tests work equally well in either). The run-time of these two test executables is now about the same, and as a result, the time it takes to run "make check" has almost halved. Change-Id: I55ef43a60588f86a8438bdecb7795aca0880efd0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | API test: Make defaultSetupParameters() smarter.Christian Kandeler2014-08-121-1/+1
|/ | | | | | | | | | It now takes the project file path and can derive a couple of things from that, so the calling functions need to do less. With the newly introduced conventions, it is no longer possible to share test data with the blackbox tests, so copy the respective directories. Change-Id: I311d982364a87188441bc6f7fedda71d025acc38 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Invalidate project after certain unsuccessful re-resolving attempts.Christian Kandeler2014-07-301-0/+1
| | | | | | | Namely, if the build data has been mangled by the re-resolving attempt. Change-Id: Ibe020a6bda38a335f95e2d2cef4f37fac3199a7d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* API: Make the ability to update project files optional.Christian Kandeler2014-07-181-0/+2
| | | | | | | | | | | | 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>
* Add missing metatype registration.Christian Kandeler2014-07-161-0/+1
| | | | | | | | 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>
* Put a system-wide lock on the build directory.Joerg Bornemann2014-07-161-0/+1
| | | | | | | | | | | | | 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>
* Make it possible to set profiles per product.Christian Kandeler2014-07-021-0/+1
| | | | | | | | | | | 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-04-281-2/+3
|\ | | | | | | | | | | | | | | | | Conflicts: qbs_version.pri share/qbs/modules/cpp/msvc.js version.js Change-Id: Id00deaf66737efd0e35230e2bddd41de1a6de60d
| * Prevent user code from hanging qbs during resolving.Christian Kandeler2014-04-161-2/+3
| | | | | | | | | | | | | | | | | | Long-running commands are handled already, but badly written project files could still hang qbs with e.g. infinite JS loops on the right hand side of a binding. Such code can now also be interrupted. Change-Id: Ie0d114bd37d540e764d5ec5bb323c91bfd64a67a Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Expose in the API whether a product can be run.Christian Kandeler2014-04-221-0/+1
|/ | | | | | | | The list of target artifacts is typically not yet available after resolving, but we already know the product type. Change-Id: I8bf98901b4123197b8d8b9ac4a4b351f251ee987 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add (failing) autotest for QBS-552.Christian Kandeler2014-04-111-0/+2
| | | | | Change-Id: Idea84b324ddccc62721ff0025ffb85c55dd82a80 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add XFAIL autotest for QBS-537.Christian Kandeler2014-03-241-0/+1
| | | | | Change-Id: I98aa65cee4e448efa6b9ab32f2165e4cc77429ec Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Do not match files in build directories as source files.Christian Kandeler2014-01-271-0/+1
| | | | | | | | This can currently happen if the user builds in the source dir and uses recursive wildcards. Change-Id: I5f3be03313640af046478ca55a381f14605176d4 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Merge remote-tracking branch 'origin/1.1'Joerg Bornemann2014-01-091-1/+1
|\ | | | | | | Change-Id: Iccf01f1dad3fca4a78c7d9b795fdef6df0181e9b
| * Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | | | | | | | Change-Id: Ib7f9a00bb891fa39c5bc1f891ddbfba1e4d23227 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Allow directories in "references" properties.Christian Kandeler2013-12-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | Such a construct will work if the given directory contains exactly one project file, identified by the ".qbs" extension. This saves annoying redundancies of the form "references: 'mysubproject/mysubproject.qbs'". Change-Id: Ief0f52f788189b7fb2e4764b692159b570fe444c Task-number: QBS-454 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Add API for adding groups and files.Christian Kandeler2013-11-201-5/+9
|/ | | | | | | This is a necessary feature for proper IDE support. Change-Id: I296beb5beae514f70babf3da1b5544726e9df82e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add failing autotests for bugs.Christian Kandeler2013-10-291-0/+2
| | | | | Change-Id: I217eac496994fdddf6a4577bddd79f3d76bba450 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>