Commit Graph

26 Commits

Author SHA1 Message Date
Christian Stenger
3d96108bbd AutoTest: Fix reparsing of header files...
...when having split source and headers and defining test data functions
inside the source file.
If we just reparse a header file (e.g. when opening the respective file
inside the editor) we have no explicit information where the definition
of the functions is. This lead to not finding the information necessary
for displaying data tags and throwing away old information as they have
been marked for removal.

Change-Id: Ieb8ed9f7c758fe2c793e60ca2c30b4025106363b
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-05-04 13:40:37 +00:00
Christian Stenger
ca4076c839 AutoTest: Avoid accessing nullptr document
Task-number: QTCREATORBUG-16129
Change-Id: I126f278d9202c63ef731ec2f29562d73ad9eade9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-04-21 10:37:43 +00:00
Christian Stenger
b4b1c50b7a AutoTest: Cancel current parse if we start a full parse
Change-Id: I55dd45c1f39abf1540ec668dd17f878c85c06253
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-04-21 10:23:24 +00:00
Christian Stenger
02a0c6f486 AutoTest: Ignore nullptr documents
It could happen that Qml related docs have not been added to the
QmlJSModelManager when trying to use them on our side.
Just ignore them when this happens as they will be added manually
as they will get added automatically when parsing the respective
main cpp file.

Change-Id: I25c4b6d9159ad4ff8def3148c2a04356380fbd27
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-04-18 07:47:12 +00:00
Christian Stenger
d0a6f70380 AutoTest: Fix possible nullptr access
Task-number: QTCREATORBUG-16062
Change-Id: Ifa544390f27b3ff73d74e4766dc93762bf152da8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-04-14 09:58:56 +00:00
Christian Stenger
01504e41b8 AutoTest: Avoid invalid parse results
If the document gets updated while typing we can get different
results when fetching the content and using positions inside the
content which might have updated milliseconds later.
Beside fetching only once ensure valid parse results by adding an
additional check for the used visitor.

Change-Id: Id1ba4a139a4dc497be0fbb5cf1f81004f3f8676c
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-03-31 13:21:54 +00:00
Christian Stenger
f34bb5e81c AutoTest: Avoid using costly containers
Replace several occurrences of QMap with QHash as we often do
not care about the order and use iterators instead of fetching
keys or values to iterate over them.

Change-Id: I5061a7e7e60fe259ac2aa31915f338a373e278d3
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-03-14 08:46:28 +00:00
Christian Stenger
cacc5bfb9b AutoTest: Fix basic CMake support...
...at least for C++ based auto tests.

Qt Quick Tests are out of scope for this issue as this
would need too much additional tweaking for several parts
of the plugin.

Task-number: QTCREATORBUG-15813
Change-Id: I440a8b1f8e6deb9e6acf2e82d0831fb002c10390
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-07 14:20:57 +00:00
Christian Stenger
ba61f2946d AutoTest: Add some gtest related settings
This patch enables execution of disabled tests, repetition of
test runs and shuffling of test sets.

Change-Id: I3668afde5766d18acdf1afb7edd913655b13a76c
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2016-02-26 09:40:46 +00:00
Christian Stenger
25d63d8556 AutoTest: Support typed gtests as well
Change-Id: I5e904ef50c76560df8b63fc766a2b78b90bf73cc
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-26 09:40:31 +00:00
Christian Stenger
36f6a5580f AutoTest: Unify handling of test tree items...
...and let specialized items handle its specialization by itself.

Change-Id: I988ce3c610bef68933b9102bb39ae4723add3a99
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-26 09:40:16 +00:00
Eike Ziller
47c3755600 mapReduce: Support progress information and add (unordered) map
If a container is given to mapReduce, it takes the responsibility to
report progress information for the whole operation. If the map function
reports its own progress, that is taken into account for the overall
progress.

The (so far only unordered) Utils::map operation can be used to replace
MultiTask, by passing a member function of the items in the container as
a map function.

Change-Id: I18ca38a6ad2899d73f590bfe59bf2e6eb2f1a57a
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-26 08:36:08 +00:00
Christian Stenger
13e0abf526 AutoTest: Copy parse results only if necessary
Copying of the results is quite costly, so reduce this to a minimum.

Change-Id: I8db3bcd72c34ddd0bdc622ec3f2fd538c9679955
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-16 12:00:42 +00:00
Christian Stenger
956db366cb AutoTest: Avoid triggering aboutToPerformFullParse twice...
...when switching projects.

Change-Id: Id4c9e4e4691ef93cea1fa7e40643c549634f0215
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-16 11:49:11 +00:00
Eike Ziller
72af6b7834 runAsync: Remove ResultType template parameter.
It is now deduced from either the type of the
QFutureInterface<ResultType> function argument, or the return type.

Change-Id: Iddab3cc329206c649a6e55a44b2de2d406701dee
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-10 10:58:55 +00:00
Christian Stenger
3f760bad1f AutoTest: Avoid temporary storing of QMap
Change-Id: I099ffb6931947f72ad242e858d82a109a0da85f9
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-02-05 13:12:06 +00:00
Christian Stenger
6ebd3cc7e8 AutoTest: Trigger onPartialParseFinished directly
Change-Id: I291712b5820c5bf84ee92621bc91497ec4264709
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-02-05 13:12:01 +00:00
Christian Stenger
02e188c3fd AutoTest: Trigger signal by QFutureWatcher
The finished signal might be triggered before the started.

Change-Id: Id23612553fdd19de2ddbee72b20b4e85448e1611
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-02-05 13:11:57 +00:00
Christian Stenger
7f61a590ab AutoTest: Do not pass pointers without owner between threads
Change-Id: I40e86716d1dd7c8a84e759e792042b84571fc2aa
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-05 09:09:31 +00:00
Christian Stenger
612f36fb3a AutoTest: Apply QC coding style
Change-Id: I79548cae407c5f7327953184977f8133885bc367
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
2016-02-05 06:49:51 +00:00
Christian Stenger
30b1e70c42 AutoTest: Report parse results through QFutureInterface
Change-Id: Ib99e9ae5efa26f01dd9c0b0bf5516e2e9dab73ce
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-04 06:05:14 +00:00
Christian Stenger
992f9ed222 AutoTest: Use mark and sweep for parsing
This also removes caching from parser and the respective test info
files are gone now as well.

Change-Id: Ibcea68e446dea532d6addd2f16863738e497bca4
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-01 08:31:52 +00:00
Christian Stenger
1caeb9bb63 AutoTest: Store referencing file inside test tree item
This duplicates (temporarily) the information for referencing files,
but the cache inside the parser will be removed within a later patch.

Change-Id: I7377864547f0d9ce074fa409b9c12067c4329d40
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-02-01 08:31:28 +00:00
Christian Stenger
3d5bb6d0bb AutoTest: Prepare parsing function to get referencing files directly
Change-Id: I53b8db50d286dccc8ec9764ddb9a2c08d52fffb5
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-02-01 08:31:16 +00:00
Christian Stenger
9a0941277b AutoTest: Simplify caching for test information
We only need the referencing file in some cases.
First step for refactoring the code parser and the test tree model.

Change-Id: I713212461e4992863ef11a0a634c5d8d786a72a9
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-02-01 08:31:02 +00:00
Christian Stenger
15b4e6fc91 Delete unneeded and prepare directory structure...
...to get plugin's repository more easily integrated
into QC's repository.

Change-Id: I10243bb4283623ae951e799feacaa15915678e04
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-01-22 14:07:19 +00:00