summaryrefslogtreecommitdiff
path: root/src/plugins/autotest/testcodeparser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* AutoTest: Access plugin singleton through static functionsChristian Stenger2018-02-011-1/+1
| | | | | | | It's the more common pattern nowadays, and cheaper. Change-Id: If6217b2a820fbfa6f088fd9349225f5f8488f593 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Introduce Q_FALLTHROUGH()Friedemann Kleint2018-01-241-1/+2
| | | | | | | Silence g++ 7.X warnings. Change-Id: I9d06d04b496c9ec060e13e1be6f43d8fbadb1f3b Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* AutoTest: Fix wrong behavior when rescan is triggeredChristian Stenger2018-01-161-1/+1
| | | | | | | | If the code parsers perform a full scan then do not use cached information. Change-Id: Ib9635c9715841ab71b97edfe42c4fe9d9d20c23a Reviewed-by: David Schulz <david.schulz@qt.io>
* Session: Remove projectContainsFileTobias Hunger2017-12-081-1/+1
| | | | | | | Use Project::isKnownFile instead. Change-Id: If69e413e4603fe6d7dc359ecd55d6233d9a3a642 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Project: Make Project::files return a FileNameListTobias Hunger2017-12-081-1/+1
| | | | | Change-Id: I75ceb22ac65b8288d824f229d44089cba6fc8ea3 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Drop unused variables and lambda capturesUlf Hermann2017-09-081-1/+1
| | | | | | | | | Also, add context to connect() expressions where we are or were capturing "this". Change-Id: I6e006ba6f83d532478018550d148ee93eca59605 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* AutoTest: Ensure reparse even for unlisted Qml filesChristian Stenger2017-08-251-3/+4
| | | | | | | | | | | | Files containing Quick tests are not necessarily listed inside the project file. If such an unlisted file is updated we have to scan for tests even if it is not part of the project otherwise it would not get updated inside the test tree. Task-number: QTCREATORBUG-18692 Change-Id: I4c4c67d50b4fff13138b0ab3c884f5ea48a7b8bf Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge remote-tracking branch 'origin/4.3' into masterOrgad Shaneh2017-05-231-1/+4
|\ | | | | | | Change-Id: I01ab8c85ea3372b6dce4142ddb9cf92d903ffca6
| * Reduce CPU load of test parsingEike Ziller2017-05-161-1/+4
| | | | | | | | | | | | | | | | Use a thread pool with reduced max thread count. Task-number: QTCREATORBUG-18185 Change-Id: I18bd3de82365edaf21d8dcf9c89035da1ac74756 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | AutoTest: Remove not needed codeChristian Stenger2017-05-191-1/+0
|/ | | | | | | | | As this functionality had been simplified GTest* classes had been ignored. Continue the simplification and finally remove now useless code and file. Change-Id: I89170cd5f05bb93bf30a05fdbf5370012bc9741a Reviewed-by: David Schulz <david.schulz@qt.io>
* Autotest: Avoid needless iterations over the project filesOrgad Shaneh2017-05-111-1/+1
| | | | | | Task-number: QTCREATORBUG-18185 Change-Id: I6c541cfa577331edc1ff3083d2f9b705ffc7ce73 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Autotest: De-noise TestCodeParserOrgad Shaneh2017-05-111-9/+11
| | | | | Change-Id: Ide351ed081417d3520714dcc44d543797f75dd4a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* AutoTest: Do not perform parse for disabled parsersChristian Stenger2017-03-091-0/+2
| | | | | | | | If a single parser triggers a reparse check if it is enabled to avoid senseless work. Change-Id: Ib28f2737be81021e1bfdd33eb347c64ffb5df020 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Handle conflicting update triggersChristian Stenger2017-03-081-2/+9
| | | | | | | | | | | If a postponed update should be done for a single parser only and another full update for all is triggered the latter one would be ignored which is wrong. An update for all parsers should always have higher priority and replace a possible scheduled update for a single parser. Change-Id: I5e1e446c7dcb9ddbcaed4606ff87a894235b723e Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Ensure that removing and adding qml files is noticedChristian Stenger2017-03-071-9/+23
| | | | | | Task-number: QTCREATORBUG-17805 Change-Id: I068f6925fc39813a504205c4ef8e8b9f9e911189 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Modernize codeChristian Stenger2017-02-171-5/+5
| | | | | | | | | | * remove unnecessary QLatin1String where possible * foreach * nullptr * bad naming of static members Change-Id: If0f7c6839be4d2efbfef6f7f0775d2034775bd90 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Allow basic filtering of scanned foldersChristian Stenger2017-01-261-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to specify folders to be used as search folders while scanning for tests. Current approach allows simple folder names or folder structures without wildcards. Examples: Value What will be (recursively) scanned tests if the current project has any (not necessarily a direct) subfolder 'tests' this folder will be scanned tests/auto if the current project has any (not necessarily a direct) subfolder 'tests' and this folder has a direct subfolder 'auto' the 'auto' folder will be scanned If there are more folders which apply to the rules then all of them will be scanned. This filtering will not keep the parser inside these folders as it might be necessary to step into different folders because of dependencies if the found tests, but the search for entry points to tests will be limited to these folders. Task-number: QTCREATORBUG-16705 Change-Id: Ib93465540cd20656d033e16205807aba6830d738 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Avoid scheduling single shots if not necessaryChristian Stenger2017-01-031-0/+2
| | | | | | | | | | This avoids doing internal stuff based on getting respective signals if there is no active test framework. The only signal that still will perform some more internal stuff is triggering a rescan from the context or global menus. Change-Id: I78f065b6bc77a100676d63248b438d3ebc71809b Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Always parse if plugin is enabledChristian Stenger2016-12-121-19/+5
| | | | | | | | | | Remove the 'Always parse' setting and respective special handling. This simplifies the handling of parsing for tests and removes strange special handling that was introduced in earlier versions and led more to confusion on the user side. Change-Id: Ia4d122ed448244f3cb3876dda9930864afde9c28 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Limit purging of test tree to project switchingChristian Stenger2016-12-021-2/+1
| | | | | | | | | | | Instead of purging the current test tree on all full parses, just purge the whole tree if the user switches the current project. If an item can no more be found after the full parse it gets removed anyhow. This avoids losing the check state on any full-parse. Change-Id: Ia7bae6ced65a69444adf0d7e2a554d90ddd5caa4 Reviewed-by: David Schulz <david.schulz@qt.io>
* Reduce thread priority for test parsingEike Ziller2016-11-151-1/+2
| | | | | | | Adding API for that to the parallel map/reduce functions Change-Id: Ic7987d899c124dcb04c1ca110b09fc97576873fe Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* AutoTest: Fix handling of enabled state for code parserChristian Stenger2016-11-141-17/+9
| | | | | | | | | | | Avoid unintentional re-enabling of the code parser. Handling of the enabled state broke several times before, therefore separate it from other states of the parser to avoid breaking it again when not taking enough care while refactoring or adding features related to states. Change-Id: If1eb0dd649225f10bfc3bf06f09851649da75983 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Re-do multi-threaded parsing for testsChristian Stenger2016-11-111-41/+20
| | | | | | | | | Avoid using global thread pool, use internally provided functions instead. Change-Id: Id8d3c72c45d85d4806e3692ef3039c31a0eae7b9 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* AutoTest: Speed up parsing for testsChristian Stenger2016-11-071-21/+29
| | | | | | | | | | | | | | | Initial parsing for tests when opening bigger projects was too slow. Try to let the parsing process on more than one file at a time to speed up the whole process. Project before now qtbase ~11min ~4min qtcreator ~2min ~40s Values above may vary depending on the underlying hardware. Change-Id: I77eeb189c82c58fce84ffbac67143ec7fa0adcae Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Reduce re-parsings while editing single fileChristian Stenger2016-10-261-10/+39
| | | | | Change-Id: If3dbcb3026733873881921cb9208b7c9da33c8de Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Modernize code a bitChristian Stenger2016-09-291-1/+1
| | | | | Change-Id: Ie56f6e5cb8a4f1962bd8df5e57214911ae609921 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Add some logging for time measuringChristian Stenger2016-09-271-0/+6
| | | | | Change-Id: I31b8ff6edf5c4bd0469da9e32a20dc9b73c46158 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Fix stopping progress animation on cancelChristian Stenger2016-09-271-0/+5
| | | | | | | | Sometimes the progress indicator did not stop its animation when parsing for tests was canceled. Change-Id: I0e4896f2b391ce6690d079fb8b33972cc5fb07f3 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Minor fix for initial test scanChristian Stenger2016-08-011-1/+6
| | | | | | | | | If parsing the project is not finished we get an empty list of files to be scanned. Just trigger another full scan for such a case. Change-Id: I84b275f76bc98c8f0ef544fc27d30ebd6f8b43d1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* AutoTest: Fix document update handling while code model indexingChristian Stenger2016-07-151-8/+3
| | | | | | | | | | | Avoid fetching all files for the startup project again and again while code model is indexing files. The indexing emits documentUpdated signals for all (relevant) processed files. If code model is indexing we perform a full parse anyhow after the indexing has finished. Change-Id: Ibfdb47f403da19d5bab3eb2295447ad451fca2b5 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* AutoTest: Cancel possible running tasks on shutdownChristian Stenger2016-07-151-1/+20
| | | | | | | | | If tasks are running while shutting down we might end up in a crash, so cancel all tasks and handle possible invalid accesses of the current running processing. Change-Id: I69f7cac5f44390e322fa301af6d6794270c95c2a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* AutoTest: Ignore generated files when parsing for testsChristian Stenger2016-07-071-1/+1
| | | | | Change-Id: I66fcb2976f05d043ebc5a1c5a611ca688fe4fd16 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Do not try to update tests for qbs filesChristian Stenger2016-07-071-1/+3
| | | | | | | | qbs files are kind of qml documents which end up inside the QmlJSModelManager. Ignore them by default. Change-Id: I7136dee80a5f5bfc1b5262daeb00890df28e3f4b Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: Fix initial parse when loading sessionChristian Stenger2016-07-071-29/+25
| | | | | | | | | Avoid displaying tests from other projects of the same session which have been indexed but do not belong to the current startup project. Change-Id: I6e0fb62cc97898ef3853ec61580dd2deb5ac64e5 Reviewed-by: David Schulz <david.schulz@qt.io>
* AutoTest: De-slot and complete Qt5-style connectsOrgad Shaneh2016-06-291-1/+1
| | | | | Change-Id: I013b42523f163e123a0cee85f9d232815ad284e3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* AutoTest: Avoid fetching WorkingCopy from multiple threadsChristian Stenger2016-06-201-0/+7
| | | | | | | | | | | Instead fetch it once before starting asynchronous processing and accept that current state of the WorkingCopy might be not completely up to date. This avoids a crash that might happen when the code model tries to update the WorkingCopy while the test code parser fetches information of the WorkingCopy. Change-Id: I2a893bc8814090361305657ed3c3d772c7bf07d5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* AutoTest: Introduce active state for test frameworksChristian Stenger2016-06-141-2/+1
| | | | | | Change-Id: I0fddce91a239c0a51352a25e34a221fd8880b733 Reviewed-by: David Schulz <david.schulz@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* AutoTest: Add test frame work handlingChristian Stenger2016-06-091-15/+21
| | | | | | | Mainly a preparation for enabling/disabling test frame works. Change-Id: I0bbea7e055a607517ef8193587c229cadf0de027 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* AutoTest: Add Id to parsers and remove now useless enumChristian Stenger2016-06-071-3/+8
| | | | | | | Preparation for introducing test frameworks. Change-Id: Iefaa4ca9dd9af665444556afa9c6e326041cfd0f Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* AutoTest: Unify naming scheme for gtest related classes and filesChristian Stenger2016-06-061-2/+2
| | | | | Change-Id: Ib0739889cbc6416da3f28f1e39b197317ec8a4e6 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* AutoTest: Move test framework related code...Christian Stenger2016-06-011-558/+6
| | | | | | | ...into files and respective sub folders. Change-Id: Ic80d693bd73993a6e74b6d422349e47276e8cb6e Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* AutoTest: Separate different test code parsers.Christian Stenger2016-05-301-96/+134
| | | | | | Change-Id: I7ff68be6e5442f7140d1257c7d9057434a398359 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* AutoTest: Decouple item and model once moreChristian Stenger2016-05-271-0/+19
| | | | | | Change-Id: I301f17dd8be7feb9dc61f483277a4835aea937af Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* AutoTest: Do not use special members in base classChristian Stenger2016-05-271-2/+2
| | | | | Change-Id: I9e110039ea886f6b0c3e6ddc7361bc9fac387abe Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* AutoTest: Unify test parse result implementationsChristian Stenger2016-05-271-12/+67
| | | | | | | | | This is also necessary for a uniform handling while adding or updating test tree items, which in turn makes it possible to separate model and items once more. Change-Id: I84ff558d23490c8734b22062f00e03e8c06d6720 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* AutoTest: Split off TestParseResult...Christian Stenger2016-05-121-8/+8
| | | | | | | ...to allow different approaches for different test frameworks. Change-Id: I16f101fb3f702a0db00cffe33e0d83cd4ea28c99 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* AutoTest: Use (shared) pointer for parse resultsChristian Stenger2016-05-121-33/+33
| | | | | | | | | | This is necessary later on as we will need different sub-classes of TestParseResult to support different test frameworks. This avoids the necessarity to put all information inside a single object even if it is not used. Change-Id: I39c74ba06b9337608ece8b113b0993c0934b24b9 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* TreeModel: Rework tree iterationhjk2016-05-121-0/+1
| | | | | | | | | | Use function objects to apply directly during a depth-first walk of the tree instead of faking a flat container of tree nodes. Less code, and allows even some non-const operations. Change-Id: I804ab11df358fe937b40809cbcb772e6f3ff8dc5 Reviewed-by: David Schulz <david.schulz@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge remote-tracking branch 'origin/4.0'Eike Ziller2016-05-091-44/+50
|\ | | | | | | | | | | | | | | | | Conflicts: src/plugins/autotest/testcodeparser.cpp src/tools/clangbackend/ipcsource/clangbackendclangipc-source.pri tests/unit/unittest/unittest.pro Change-Id: I9db4fbea6ea7c9fdd0d8e1703735af20c92e754b
| * AutoTest: Fix parsing of Qt tests when using developerbuildChristian Stenger2016-05-041-19/+26
| | | | | | | | | | Change-Id: I226884c10e8fea48d08892b4dab3793b9babc0e5 Reviewed-by: Eike Ziller <eike.ziller@qt.io>