aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/tools
Commit message (Collapse)AuthorAgeFilesLines
* remove qbsSettings() functionJoerg Bornemann2014-07-091-3/+3
| | | | | | | | 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 the user to specify a custom place for settings.Christian Kandeler2014-02-211-1/+1
| | | | | | Task-number: QBS-509 Change-Id: I4ad32c648121068880d652e3ba39d4eea59dfbc3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* 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>
* 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>
* Clean up autotests.Christian Kandeler2013-02-111-14/+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>
* Build a shared library.Christian Kandeler2013-02-086-181/+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>
* Remove global log sink.Christian Kandeler2013-02-062-8/+16
| | | | | | | | | | | | | | | 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>
* 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>
* Do not hardcode the settings source in the library.Christian Kandeler2013-01-291-20/+27
| | | | | | | | | 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>
* Integrate tool-specific help into general help.Christian Kandeler2013-01-281-1/+1
| | | | | | | | This is done by calling "qbs-<command> --help" when "qbs help <command>" has been entered (after trying the internal commands). Change-Id: I7eaf0cd2a7c6774c5edd3cc83a5a88d45ba577e8 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Remove the "platform" concept.Christian Kandeler2013-01-181-7/+7
| | | | | | | | | | Ever since profiles were introduced, platforms have had no real purpose anymore, so it's about time we get rid of them. ("Property sharing" can instead be implemented via base profiles.) Change-Id: I1d629c9b698c7006f733a3c1382b0474f030915e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Introduce profile inheritance.Christian Kandeler2013-01-161-0/+58
| | | | | | | | This is supposed to replace platforms in the future. Documentation will be added when that happens. Change-Id: I0eab22ac6afeaabd78b3c84299758595941f9098 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* update copyright yearJoerg Bornemann2013-01-091-1/+1
| | | | | Change-Id: Ic2962e57ede037b910d7e77b01b0163f0a22cb7d Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Redo help output.Christian Kandeler2012-12-052-22/+27
| | | | | | | | | | | | | | It's not feasible to document all commands and options correctly in one help screen. Instead, we now have a main help screen listing all possible commands and one dedicated help screen for every command. The more thorough and precise help output goes hand in hand with fixing a number of parsing bugs and underspecified commands. This, in turn, necessitated a refactoring of the command line parser, which is now much more modular. Change-Id: Id18f8c609d7d4a797a06598c3df4bc9ba02c9615 Reviewed-by: Joerg Bornemann <joerg.bornemann@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>
* fix FileInfo::lastModified() return values for nonexistent filesJoerg Bornemann2012-11-091-0/+1
| | | | | | | | The return value for nonexistent files was read from uninitialized memory. Only Windows was affected. Autotest added. Change-Id: I386ab1caf0076afd54cd2a46736e9bc122a372e2 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Do product filtering at an earlier stage.Christian Kandeler2012-11-061-1/+1
| | | | | | | | | | | | | It is unintuitive and confusing to give the Sourceproject and the Executor a list of projects as part of their build() operations, when in reality just some products should be built. So take the "selectedProducts" out of the Buildoptions and do the filtering outside of the library. This way, we can tell the API "build these projects" or "build these products" and it will mean exactly that. Change-Id: I88860a9cf7f4058145964b1b56b01e7970c9e8d0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Get rid of some Q_OS_* ifdefs.Christian Kandeler2012-10-231-3/+3
| | | | | Change-Id: Iec0c5f795fafc37ea15e3e1cf46b392f0c7b6375 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Remove some redundant namespace usages.Christian Kandeler2012-10-231-21/+23
| | | | | Change-Id: Ie00bea24eb95dbd16f987373138899825c228ce5 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix handling of source file paths that contain "../"Joerg Bornemann2012-10-231-0/+3
| | | | | | | Task-number: QBS-139 Change-Id: I8c0e9f0574859c26abe7ead2e64aa0ecd4bfa3ec Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Get rid of special treatment for files ending in ".qbp".Christian Kandeler2012-10-194-2/+2
| | | | | | | | | - Deprecate the ".qbp" suffix. - Do not go up the directory tree when looking for project files. Change-Id: I39ece65683556b720fb940dde27e485f865cf086 Task-number: QBS-137 Reviewed-by: Joerg Bornemann <joerg.bornemann@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>
* Move command line parser out of lib/.Christian Kandeler2012-10-162-29/+32
| | | | | | | | It's by definition for use by the qbs command line tools only, so put it into app/. Also make the class name match the file name. Change-Id: I32f99563a9c5d1078137d90320aac0e6f28eaee6 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Remove as much stuff as possible from the evil Qbs namespace.Christian Kandeler2012-10-161-1/+1
| | | | | | | | | | 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>
* Clean up main().Christian Kandeler2012-10-161-5/+6
| | | | | | | | | | | - Modularize: Move implementations of all top-level commands into their own functions. - Move a couple of checks to places where they belong better. - Remove graph dumping functionality. As a result, the code flow is now much more obvious. Change-Id: I571e07965d10c3b79da4c40e977c95e5626e8a5d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Use consistent name for tools test.Christian Kandeler2012-10-161-2/+2
| | | | | Change-Id: I1ef28e33a0df38b83c0abd01a0488ee93cc021e5 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>
* Introduce BuildOptions.Christian Kandeler2012-10-151-3/+3
| | | | | | | | This aggregates some build-related options needed by the Executor, who can now receive them via a single setter. Change-Id: I130ef1657ecd7a898a920fa370b876eebd0bc059 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Sanitize the semantics of the command line verbosity setting.Christian Kandeler2012-10-101-2/+11
| | | | | | | | | | Allow increasing and decreasing the log level via -v and -q, respectively, as well as setting an absolute value via --log-level. Improve the help output along the way. Change-Id: I5d756f41d34c577aa52775b9664c773d89956a94 Task-number: QBS-80 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Rework command line parsing.Christian Kandeler2012-10-101-3/+19
| | | | | | | | | | - Allow combined short options, e.g. "-vkj 3" meaning "-v -k -j 3". - For options taking list arguments, expect these lists as comma- - Refactor command line parsing. It should now be easier to understand what is going on, which is necessary for adding new options. Change-Id: Ic4af05edeb435e693c667714517dfdb571cc8c46 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Improve command line parsing.Christian Kandeler2012-10-091-6/+6
| | | | | | | | | - Remove unsupported option "-g". - Internationalize error messages. - Don't silently fail in case of invalid "-j" option. Change-Id: Ia4835097547e1bd99f2ad65b069f678a116319a0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* license and copyright updatedJoerg Bornemann2012-10-081-28/+20
| | | | | | Change-Id: I0c0b3035514ee6b735e85c098029fa2f41edb6ff Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* normalize autotest executablesJoerg Bornemann2012-10-081-1/+1
| | | | | | | | All autotest executable names start with "tst_". Every autotest executable is its own subdir. Change-Id: Id5b10792930064acd4e741c207d0046f54a55695 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* provide a QCoreApplication instance for tst_toolsJoerg Bornemann2012-10-041-1/+1
| | | | | | | FileInfo::applicationDirPath needs it. Change-Id: Iba0825e8f6901307b4cf10ee14f3b6b62c217325 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* tst_tools: adjust to changes in command line handlingJoerg Bornemann2012-10-041-2/+3
| | | | | Change-Id: I548260f2943f3004c5a184597893dfc4336a9794 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* tst_tools: add test for FileInfo::completeBaseNameJoerg Bornemann2012-10-041-0/+1
| | | | | Change-Id: I77cd559dfbaa9eae81055e93863427cd5d701f51 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix testProjectFileLookupJoerg Bornemann2012-10-041-0/+2
| | | | | | | Make sure that data/dirwithnoprojects is in the repository. Change-Id: Ic724edf859a4957d93f1de73e6988bb7bbe7b220 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Look up project file in directory, if one is given.Christian Kandeler2012-10-024-0/+21
| | | | | | | | | | This allows the user to specify via "-f" the directory which the project file is located in instead of the whole file path. in most cases, a directory will contain only one project, so the user can save some typing there. Change-Id: I1a828480b522517e00b2b183da9b9ad602a6a424 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Rework #includes.Christian Kandeler2012-10-021-1/+1
| | | | | | | | | | | | | - Do not use the Qt module as a prefix. This serves no purpose and potentially introduces incompatibilities between different Qt versions. - While we're at it, also - sort #includes by file name - use the official file name instead of the internal one (e.g. QtGlobal instead of qglobal.h). - remove some excessive whitespace Change-Id: I9358b2571622ca661936382305d7f159b9770008 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* auto test clean upJoerg Bornemann2012-03-191-1/+12
| | | | | | | | Tests for options and tools merged. Test for language features prepared. Change-Id: I98d402ac568625c2a7eb2ab18a63f1db0262bda9 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Long live qbs!Joerg Bornemann2012-02-152-0/+76
Change-Id: I412793e868919a9ac99611616f292e7047f1ebcf