aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/language
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* remove Settings parameter from Loader c'torJoerg Bornemann2013-03-211-3/+1
| | | | | Change-Id: If09122d2beb678e075e40a967a1b9d4d7d24c67d Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* qbs project files: Add support for auto tests.Christian Kandeler2013-03-181-0/+6
| | | | | Change-Id: I02715cda889f9f271a4372b0dec70645674f8843 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* use the simplified base import statementJoerg Bornemann2013-03-081-1/+1
| | | | | Change-Id: I3c9e5d5512cad7028026d6166a0783fd507e7826 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* slash the Loader's Gordian KnotJoerg Bornemann2013-03-071-0/+44
| | | | | | | | | | | | Split Loader into ItemReader, ModuleLoader and ProjectResolver. Get rid of our three QScriptClass derivatives and replace them with one, named EvaluatorScriptClass. The complete knowledge about the project structure is held by a tree of Item objects that are independent of QScript* objects and thus are prepared to be serialized. Change-Id: I53e23426d55e7de9cec6f9f29da55fb9c4704d71 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Clean up autotests.Christian Kandeler2013-02-111-11/+2
| | | | | | | | Their project files are mostly identical, so introduce auto.pri. Also remove outdated and unused test "dependencyFinder". Change-Id: Ibe7f40cf1b0e28719fbf91a905379432a0359968 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* add autotest for ProductModule itemsJoerg Bornemann2013-02-111-0/+1
| | | | | Change-Id: Ia1239e59d35001d7cdf5655c9fc29b5a3c000f69 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Build a shared library.Christian Kandeler2013-02-0821-1293/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | We don't want our code to be duplicated in memory for each application that uses it, so the library should not be linked statically. Some ramifications worth mentioning: - The unit tests had to be moved into the library, because otherwise we would need to export random internal symbols. This is why the patch appears so big. A follow-up patch should probably make compilation of tests optional, so the library can be deployed without unneeded code. - The DESTDIR of the auto test executables is now the same as the one of all other executables, so they can all use the dll on Windows without additional setup. - Some internal symbols were exported, namely: a) Logging-related stuff. This allows us to use a uniform logging approach in the library and in our command-line tools; I consider this acceptable. b) A handful of classes and functions currently needed by certain command-line tools. These seem more questionable to me and we should probably find a different way to implement the respective functionality. Change-Id: I9cd21e12cd622b55cf62f5e04ad398734410ede1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* enhance TestLanguage::propertiesBlocksJoerg Bornemann2013-02-062-0/+22
| | | | | Change-Id: I2332bb0ad1b03db1ab4c5d56e441e342f807f50c Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* create autotest for group conditionsJoerg Bornemann2013-02-063-0/+106
| | | | | Change-Id: I1e4af7cebd755b5965a2e3bca9909212394b4532 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Remove global log sink.Christian Kandeler2013-02-063-6/+7
| | | | | | | | | | | | | | | Applications may not want to use the same log sink for all builds. The logging facility is also decoupled from the command-line client in other ways: - The LogWriter modifiers for output channel and text color are gone, since this type of decision should not be made by low-level code. Instead, the "highlight" string can be forwarded to the log sink. - The console logger now lives in app/shared, as it must never be used by library code. Change-Id: I8863a554c9b74577320ef23f6f934a74e0f0cbb0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* add autotest for invalid Depends usageJoerg Bornemann2013-02-044-0/+36
| | | | | Change-Id: I46a1089323a191c71c00522f1b96c2fdd700039f Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* add autotest for loading modulesJoerg Bornemann2013-02-046-0/+96
| | | | | Change-Id: If442778b8fc5830639bbea17e423bc3d0414ca23 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Introduce new class SetupProjectParameters.Christian Kandeler2013-02-012-18/+24
| | | | | | | | It comprises the parameters specific to resolving a project. This way, fewer function parameters have to be dragged along the call chain. Change-Id: I224b090c1ad924213dad3236141f27971e64c965 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Do not hardcode the settings source in the library.Christian Kandeler2013-01-292-2/+4
| | | | | | | | | This is inherently application-specific. Therefore, the library must not instantiate the Settings class itself anywhere; instead, a pre-allocated object comes in via the API. Change-Id: I04a101d5535508b9e165123b4efe06d957c0d171 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix language test.Christian Kandeler2013-01-291-11/+8
| | | | | | | The loader needs an absolute project file path now. Change-Id: I3fc19e7c27a7afd81d187dec779d1793d6733442 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Added support of recursive wildcard patternsRuslan Nigmatullin2013-01-281-15/+23
| | | | | | | | Behaviour of bash with globstar option is reproduced Change-Id: Ibedd640084c398c9141d0d91bd37868235eae1e5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Introduce the "install" command.Christian Kandeler2013-01-224-10/+8
| | | | | | | | | | | This decouples building and installing, e.g. allowing the latter to be executed by a privileged user to a system-wide directory. In addition, the ability to install build artifacts (typically executables or libraries) has been added. Change-Id: I28e725e4c1168eebe88e12c75e3d3e9f5fe28ca5 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix TestLanguage::productConditionsJoerg Bornemann2013-01-151-4/+17
| | | | | | | Disabled products are in the project now. Change-Id: Ied88ad238e189e42a3e771cf49a68d14ae726c5b Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Re-do the wildcard implementation.Christian Kandeler2013-01-141-15/+6
| | | | | | | | | | | | | | This feature is in desperate need of simplification, since the current semantics are not clearly defined. The main culprit for that is the ability to use wildcards in directory names, which leads to all sorts of problems, especially in combination with the "recursive" flag. We therefore disallow that now: Wildcards can only be used to match actual files. This results in clear semantics that are easily understood and can actually be documented. Change-Id: If8a950e1c1a362ce9fb57a1c9789a83ea7c8b3ba Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* update copyright yearJoerg Bornemann2013-01-092-2/+2
| | | | | Change-Id: Ic2962e57ede037b910d7e77b01b0163f0a22cb7d Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* testcase for outer property in groups addedJoerg Bornemann2012-12-164-1/+53
| | | | | Change-Id: Ib46a92f3887aefcb4ae4351769d1d5acce8e7b4d Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* add property Product.excludeFilesJoerg Bornemann2012-12-111-3/+0
| | | | | | | Task-number: QBS-176 Change-Id: If64721c730be94c3d918fe1b3dd000272de4059c Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* add extensive autotest for wildcard expansionJoerg Bornemann2012-12-112-1/+207
| | | | | Change-Id: I79bdc75f6e5ce08becc4ca2e8fd9b66ef498f8f5 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Fix usage of forward declared classesOrgad Shaneh2012-12-032-0/+13
| | | | | | | Avoid implicit destructors Change-Id: If8699e1308adf567c27d1419d1e07e5abb8de973 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Reduce compile dependencies.Christian Kandeler2012-11-292-33/+35
| | | | | | | | | | | | | | | | | While it seems elegant at first glance to do typedefs in class scope, it has one serious drawback: Forward declarations become impossible unless they use the non-typedef'ed type name, which defeats the purpose. As a result, dozens of headers currently include language.h and buildgraph.h, even though they technically don't have to. Fix this by introducing special forward-declaring headers and doing the typedefs there, outside the class scope. Now changes to header files included in language.h or buildgraph.h don't ripple through half the project anymore. Along the way, also remove unneeded and potentially harmful INCLUDEPATH statements from various pri files. Change-Id: Ib50db850876955216db7f39b6099c32d1239092b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Rename namespace QmlJS to QbsQmlJSTobias Hunger2012-11-291-3/+3
| | | | | | | | This is necessary to link against Qt Creator which has its own private copy of QmlJS which interfers with the one in qbs. Change-Id: Ia0a353ca2d5260fd5978e10c8f83f44b3728a20d Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* fix search result counting in IdentifierSearchJoerg Bornemann2012-11-161-0/+8
| | | | | | | Multiple occurences of the same search result must not be counted. Change-Id: I8200a3c6da425c3796591fe23234ddb2500da599 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* cleanup .pro filesJoerg Bornemann2012-11-161-3/+2
| | | | | | | | Do not use DEPENDPATH but CONFIG+=depend_includepath. Do not add "." to INCLUDEPATH. Change-Id: I3532833aef13d32f8278074283fcd12256d38143 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Loader: search for identifiers by traversing the ASTJoerg Bornemann2012-11-152-0/+67
| | | | | | | | | Replace the naive sourceCode.contains(...) calls with a proper AST traversal when looking for the use of "base" or "outer" identifiers. Introduced the class IdentifierSearch. Change-Id: I5892002ed061b8bb3ff724470c6ab1f09ddb8018 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Clean up the Loader class' header file.Christian Kandeler2012-11-151-17/+12
| | | | | | | | | | | It's full of stuff that is only used in the Loader class itself, completely obscuring the interface. Move all of that to the source file. Also don't force clients of the class to call both loadProject() and resolveProject(); introduce a new function that does both. Change-Id: I35063a3728ac35888c2bbc7616b356be4bb8018d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Introduce the first version of a public API.Christian Kandeler2012-11-071-2/+2
| | | | | | | | | | | | | | | | | | | | We offer the following services: - Build a number of projects. - Build a number of products. - Retrieve the project structure. - Find the executable for a product. - Set up an environment to run a shell or a target (mainly interesting for our command-line client). In order not to leak internal data, some parallel data structures have been introduced for external access to project information such as source files etc. These are intentionally minimal and can be extended once use cases arrive. Note that the Group class has been renamed to ResolvedGroup, so we can use the simple name for the external API. Change-Id: I6dc5d7914ee9b232098a55f9d3b0e725debe3bc8 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Rename classes.Christian Kandeler2012-11-061-2/+2
| | | | | | | | | The central class of the public API should have a name that suggests its role to clients, so we call it "QbsEngine". The class currently using this name is now called "ScriptEngine". Change-Id: I77eba4618a3e1313c2d3a43fe29585aad638da4e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Revert "Rename classes."Christian Kandeler2012-11-061-2/+2
| | | | | | | | This reverts commit c39e9a0715c4469c78a1e797426db6d94df51c4c The commit is correct in principle, but was prematurely merged and should have been based on an additional patch. Change-Id: Id5920491fa948ac48f304797f5ec959b28e9ac25 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Rename classes.Christian Kandeler2012-11-061-2/+2
| | | | | | | | | The central class of the public API should have a name that suggests its role to clients, so we call it "QbsEngine". The class currently using this name is now called "ScriptEngine". Change-Id: I6c3e6d5770ac8b096d9515cbe5762fe97346ab7e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix evaluation of module values from imported JS filesJoerg Bornemann2012-11-054-0/+57
| | | | | | | | | | | | | | | | | | When importing a JS file, a JS object X is created that contains the evaluated code. Due to the importer's implementation, X is a former activation object that's been pulled out of a new context. When evaluating a Scope property, we call setActivationObject. This replaces - and thus destroys - the first script value in the scope chain that is of the internal type "activation object". That's why X got destroyed when evaluating qbs module values from code that lives in X. We're solving this issue by copying all properties of the activation object into a fresh and clean JS object. Thus we're avoiding any special handling of activation objects. Change-Id: Ibbf3ecca961a781d4a3e0886308f90ae48ecadba Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Move the PersistentObject class into its own header.Christian Kandeler2012-10-291-0/+2
| | | | | | | | | | | | At the moment, every declaration of a class inheriting from PersistentObject has to include the template-heavy persistence.h file, causing it to transitively be included in pretty much every source file. By decoupling PersistentObject from that header, we get rid of a bunch of unneeded compile dependencies, speeding up compilation in general and especially if something in persistence.h changes. Change-Id: I1a95390015f75bdfca0d139144fa5c54c7971dc4 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Document some classes.Christian Kandeler2012-10-291-1/+1
| | | | | | | | | | | Along the way, rename some things to help understand them: - Configuration -> PropertyMap - Rule::fileScript -> Rule::fileName Change-Id: Ibff62526fe8e0be92b23456c942665ebb7db10dc Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix handling of source file paths that contain "../"Joerg Bornemann2012-10-231-5/+5
| | | | | | | Task-number: QBS-139 Change-Id: I8c0e9f0574859c26abe7ead2e64aa0ecd4bfa3ec Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix Group.overrideTagsJoerg Bornemann2012-10-222-0/+12
| | | | | | | | As discussed on the ML before, overrideTags defaults to true. Add a test for this property and some documentation. Change-Id: Id09af0a8040ef6eaf330b762ff9603fce0748af2 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* refactor Groups and wildcard handlingJoerg Bornemann2012-10-222-19/+54
| | | | | | | | | | To access the project's group structure from the IDE we must make sure to mirror that correctly in ResolvedProduct. Until now we just maintained a flat file list plus the wildcards desriptions which were called "Group". Change-Id: I5b86784d792ecb61fe2854f01a8200564d0c9d99 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix autotests for insource buildsJoerg Bornemann2012-10-181-1/+1
| | | | | | | | | | The way of preventing qmake from building in debug/release subdirectories on Windows is DESTDIR = ./ Don't ask why. Just accept defeat. Change-Id: Iec3faa864e73f5016148ecab6f128ab0cb104fd5 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* remove QtConcurrent reference from .pro filesJoerg Bornemann2012-10-181-1/+0
| | | | | Change-Id: I637502f149308e45701a42524ca15d0e6f9fc8f2 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* introduce Group.name propertyJoerg Bornemann2012-10-173-0/+32
| | | | | | | | | | | | | | | | One can now name file groups. This is for display purposes in IDEs. Example: Group { condition: qbs.targetOS === "linux" name: "Linux specific files" files: [ "myfile_linux.cpp" ] } Change-Id: I84c31a9b99212af1dc53eb936c628320c979828c Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Remove as much stuff as possible from the evil Qbs namespace.Christian Kandeler2012-10-161-2/+2
| | | | | | | | | | The only thing left now are the classes whose names would clash if they were in the same namespace. During the move, it turned out we have quite a number of logging-related facilities, so introduce subdir "logging". Change-Id: I3b673cd4f75e2ca61605a88886cfcdcac6d6bcd6 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix misuse of Configuration classJoerg Bornemann2012-10-162-5/+2
| | | | | | | | | | The Configuration class is the set of properties that is attached to a product or an artifact. Do not misuse this as build configuration to set up the build. Change-Id: Idfdaae2ddbe205292e054772d51562a0162a308a Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* mark autotests with CONFIG+=testcaseJoerg Bornemann2012-10-161-0/+1
| | | | | | | This enables us to run all tests with "make check". Change-Id: I9ea1816c88c1c0d27fb8dda4cf6ca46b13cb8fc0 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* consolidate test binary locationsJoerg Bornemann2012-10-151-0/+1
| | | | | | | | Do not use debug/release subdirectories on Windows to make it easy for the testRunner tool to find tests. Change-Id: I3bc572c7959c6bcc7cd7e12e1f5d4bb6ccb0753c Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Rename logsink.hChristian Kandeler2012-10-121-1/+1
| | | | | | | | It contains facilities for console logging, and its name should reflect that. Change-Id: Ib9fc7679b754fe813cdccfd00e6269bce17b675d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* share one QbsEngine with Loader and BuildGraphJoerg Bornemann2012-10-121-1/+3
| | | | | Change-Id: I972bea425982baaf3edc330bc88973f78014710b Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>