aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* fix productProperties autotest on MacOSJoerg Bornemann2013-03-201-1/+2
| | | | | Change-Id: I3d03df6c070ee9a0d50c25be9d23d5a75df13e88 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix link_staticlib autotest on MacOSJoerg Bornemann2013-03-201-1/+2
| | | | | Change-Id: I5fe204fc5262cae6c68edf20184452ede4f9b474 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* beautify ccp function in tst_blackbox.cppJoerg Bornemann2013-03-201-14/+15
| | | | | | | | | Use meaningful variable names, fix whitespace issues and reuse already computed values. Change-Id: Ic062a201b15a152feb5f9d5587fff809699e8f32 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* add test for tracking of product addition/removalJoerg Bornemann2013-03-1910-0/+116
| | | | | | | Task-number: QBS-235 Change-Id: Icb3b55e45d32b09b7e907f081e61d89a26530068 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* remove pointless ccp calls from TestBlackbox::trackRemoveFileJoerg Bornemann2013-03-191-2/+0
| | | | | Change-Id: I48ba7c1aae5848d35765f3c918688120213f68ed Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Add test case for checking property changes on incremental builds.Christian Kandeler2013-03-195-0/+69
| | | | | | | Known not to work correctly at the moment. Change-Id: Iecde14cdf7e1a55277e840d98563167ab43504f3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* turn tests/manual/link_staticlib into autotestJoerg Bornemann2013-03-187-0/+4
| | | | | | | Fix following. Change-Id: Id97db271cde3e5a949b14eb2b4e6a1137f3c5c24 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix sameBaseName autotest on MacOSJoerg Bornemann2013-03-181-0/+1
| | | | | | | These tests must not be built as application bundles. Change-Id: Ia79d0546d42d4afd5670a21a592ac57d8c76b23b Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Remove trailing slash from SRCDIR defines.Christian Kandeler2013-03-181-1/+1
| | | | | | | | Fixes the cmdlineparser autotest, and one should not rely on this anyway. Change-Id: Ice3dd88476c0dfe6e4f19fb1da867b4636581bd3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* qbs project files: Add support for auto tests.Christian Kandeler2013-03-187-3/+74
| | | | | Change-Id: I02715cda889f9f271a4372b0dec70645674f8843 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add a new test for the .o filename bugfix.Jake Petroules2013-03-187-0/+78
| | | | | | | Task-number: QBS-211 Change-Id: I78e3fd4274a1800265b7ccc7cdc71bb0780f76f2 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* clean up INCLUDEPATHJoerg Bornemann2013-03-151-0/+1
| | | | | | | Only add src to the INCLUDEPATH where it is needed. Change-Id: I1777dcf98837b1d74b0034ba70e98dc711107328 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Use the correct method for obtaining the OS X version.Jake Petroules2013-03-152-9/+7
| | | | | | | Gestalt is deprecated in the latest OS X SDK (10.8). Change-Id: I86116740d6fcc61dc67d34fef6e5203e6717241e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix blackbox tests after ebdce31cJoerg Bornemann2013-03-121-9/+10
| | | | | Change-Id: I308d8ad7df60ded80266c52b352259de06760365 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* use the simplified base import statementJoerg Bornemann2013-03-0853-53/+53
| | | | | Change-Id: I3c9e5d5512cad7028026d6166a0783fd507e7826 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* remove superfluous version numbers from import statementsJoerg Bornemann2013-03-085-5/+5
| | | | | Change-Id: I977081507fcdd60a94a8cfc8fde884984fb6cf13 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Add an autotest for the "missing header file" situation.Christian Kandeler2013-03-085-0/+40
| | | | | | | | | | | | | | | The test checks whether qbs handles the following situation correctly: - A class derived from QObject is implemented in a pair of header and source files. - The header file is mistakenly not added to the qbs file. - The build fails with a linker error due to missing Q_OBJECT content. - The header file is then added to the qbs file. - The build succeeds. This currently does not work, so the test is marked as expected to fail for now. Change-Id: I1de131504f56d807c6a0dec6865839230a053526 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add generic QSKIP macro abstracting the differences between Qt4 and Qt5.Christian Kandeler2013-03-081-5/+7
| | | | | Change-Id: I590558e94d0e103be8737c6c33a180f5aafffa04 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix tests/manual/localDeploymentJoerg Bornemann2013-03-071-4/+2
| | | | | Change-Id: I29be721327ffb548bc11f88a2624f7aa90f093b8 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>
* Fix "qbs clean" autotest on Mac.Christian Kandeler2013-03-011-0/+3
| | | | | | | Switch off bundle generation to have the same paths on all platforms. Change-Id: I970aba7a3b99219cb6489f312f457347f17ef9af Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix tests/manual/configure for WindowsJoerg Bornemann2013-02-281-5/+9
| | | | | | | Process doesn't split the cmd argument. Change-Id: Iebdebff0cf18b046eac249441847ee39ec87c9eb Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix tests/manual/configure for WindowsJoerg Bornemann2013-02-281-1/+1
| | | | | Change-Id: Ic9b83cd7422b917b524785e5f5fcae5c79f2da35 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Add autotest for "qbs clean".Christian Kandeler2013-02-285-0/+83
| | | | | Change-Id: I2a12172b10ac9649b757978debfde7418ee553dc Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix accessing product properties via the "product" property.Christian Kandeler2013-02-214-0/+62
| | | | | | | Also add an autotest for this. Change-Id: If4d3bf50eee4d77dcac12c1cf574dc08780c3dae Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Turn "codegen" into an autotest.Christian Kandeler2013-02-214-0/+8
| | | | | | | Nothing manual about it. Change-Id: Ia3a0d75ab919dc89bdacbeaf3430c036c47fed20 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add pieces missing from property access refactoring patch.Christian Kandeler2013-02-211-3/+1
| | | | | | | | | | Addendum for ff9ea2eef48f0f3f593df27f449159fcc177045d. - Add missing JS export for product.consoleApplication. - Remove PropertyDeclaration for "module" and "modules". - Adapt "codegen" test. Change-Id: I032f210c735653863c57437e521b700a3503bd6b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Make project installable on Unix/Linux.Christian Kandeler2013-02-151-0/+1
| | | | | | | | | - Add installation rules. - Adapt rpath and some publicly visible #includes to be relocatable. Change-Id: Ie3560bbf2a5ec4d41e5e3064a95a5273f683df08 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Make internal unit tests optional.Christian Kandeler2013-02-131-4/+9
| | | | | | | | | The respective code will not be compiled into the library unless "all_tests" is added to the qmake CONFIG variable. Change-Id: I45ab29666e3ce55baa4c83b3f4e1821258ba1b64 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove tests/manual/patternfilesJoerg Bornemann2013-02-124-62/+0
| | | | | | | | This test is out of date and the wildcard functionality is covered in the autotests. Change-Id: Icabaf96a625ee5cf744c1e9f825da53c1c535a0b Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Fix behavior of "qbs update-timestamps".Christian Kandeler2013-02-124-18/+0
| | | | | | | | | Only files that already exist should get a new timestamp. The blackbox autotest checking the current behavior has been removed, since the new one is not easily observable from the outside. Change-Id: I0c38e5e57a9c9c6d8811c45bba014dfda24e24ce Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Clean up autotests.Christian Kandeler2013-02-1114-673/+21
| | | | | | | | 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-0835-1614/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-067-17/+28
| | | | | | | | | | | | | | | 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>
* Qt4 compile fixJoerg Bornemann2013-02-041-0/+4
| | | | | | | QSKIP is not source compatible. Change-Id: I665043f28f4a3e8ba398e9c422cb4c417df1227c Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Remove expandBuildConfiguration() from the API.Christian Kandeler2013-02-042-0/+12
| | | | | | | | | | How the configuration is represented is implementation-specific and does not belong in the API. Also add an auto test for the type of error that can happen in that function. Change-Id: Ide1740e5d785b3e86a5b47adde783db48536fb16 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>
* Check whether stored build graph is really for our project.Christian Kandeler2013-02-015-0/+25
| | | | | | | | | | | | | | | | | At the moment, we accept build graphs for any project and claim "Build done" if it's newer than the project file. With this patch, we error out in such a case by default. We do not simply discard the existing build, because presumably the user made a mistake and does not want the existing build to be overwritten by one for a completely different project. If a user is sure it's the same project after all (e.g. the sources have moved or the project file was renamed), the "--force" option can be used. If a user really wants to throw away the build for the other project, that must be done manually. Change-Id: I1194fcc4695632a6b96789bc8032f9d3b3a55ce3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Introduce new command-line option "--force".Christian Kandeler2013-02-011-0/+10
| | | | | | | | Useful for overriding certain sanity checks. No use case implemented yet. Change-Id: I10df8fbfde9b293832298fa27fc6fd4955dd9a44 Reviewed-by: Joerg Bornemann <joerg.bornemann@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-293-22/+31
| | | | | | | | | 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>
* Fix blackbox test.Christian Kandeler2013-01-292-4/+6
| | | | | | | Tools do not take a profile. Change-Id: I8e56654c57a01a17881ff8160b6b4ae41b9d1ac0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix recursive_wildcards testJoerg Bornemann2013-01-291-2/+1
| | | | | Change-Id: I40555fc56c384aeedd8578034b1f43958e30b1ed Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* remove invalidWildcards testJoerg Bornemann2013-01-292-15/+0
| | | | | | | Stars in directory parts are allowed. Change-Id: I5cac66081b16657327f98744146a4cd5311fcf73 Reviewed-by: Christian Kandeler <christian.kandeler@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>