Commit Graph

11 Commits

Author SHA1 Message Date
Christian Stenger
80f61a5db9 AutoTest: Extract data gathering and parse result creation
Function processDocument() became to huge. Beside this it
might be needed to re-use functionality partially.

Change-Id: I4c31caa4458c165938c3d6f1170d8ac4806d2af1
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-06 07:19:42 +00:00
Bernhard Beschow
ed6083b521 AutoTest: Improve type safety in TestParseResult
By having TestParseResults take ITestFramework rather than ITestBase as
parameter, some base->asFramework() casts can be avoided today which
could possibly fail in the future.

Moreover, it allows TestTreeItem to take ITestFramework rather than
ITestBase as parameter which improves type safety further. This shall be
done in a separate commit though.

Change-Id: I66594415d68c3423076a0830ecd11080d3b6c186
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-04 11:31:56 +00:00
Bernhard Beschow
5d7f2d7444 AutoTest: Use working copy of own parser
In TestCodeParser::syncTestFrameworks(), a parser is created for every
test framework. As a result, the last parser being created would "win"
the global s_parserInstance variable, which is not predictable and
probably not intended. So turn CppParser::getFileContent() into a non-
static method, avoiding the global variable altogether.

Change-Id: I9f7560f1185bc4a3bc7b2b36e89280351998465e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-22 10:51:53 +00:00
Christian Stenger
24db5dcc4f AutoTest: Use base of framework inside TestTreeItem
...and respectively inside the parse results which hold the
information that are used to create the items.

Change-Id: I78f7b5632df5d449d39fa03ffbf48036a138e337
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-09 08:23:00 +00:00
hjk
d3f79fcc68 AutoTest: Use ITestFramework * instead of its id in some cases
Change-Id: Ic327e31185247b6479c78af8bf8156f44bb4bdfb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-03-16 12:18:29 +00:00
Christian Stenger
a4c318d5e1 AutoTest: Fix wrong behavior when rescan is triggered
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>
2018-01-16 07:35:06 +00:00
Christian Stenger
0ceea628b0 AutoTest: Do not lose information of base classes
In case the base class is defined outside of the file with the
derived class we are missing the correct entry point.
Work around this by getting alternative entry points beforehand
and using them if we cannot find a valid entry point.

Task-number: QTCREATORBUG-17522
Change-Id: I07ef87b2fcdac4f78240da9e57eaa518ff0f4d20
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-01-06 06:19:35 +00:00
Christian Stenger
7d1d4471f0 AutoTest: Introduce inherited state for Qt test tree items
Preparation for later detection and displaying inherited functions
for Qt tests.

Task-number: QTCREATORBUG-17522
Change-Id: I2af1f758a837049ef676840b03f9cd73a2cb9873
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-01-06 06:19:22 +00:00
Christian Stenger
38484d463c AutoTest: Correctly release resources
Change-Id: I8023c1468f9cf9cc0c549a466b298e19a6b40a15
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-07-15 09:19:18 +00:00
Christian Stenger
d198c4a22f AutoTest: Add Id to parsers and remove now useless enum
Preparation for introducing test frameworks.

Change-Id: Iefaa4ca9dd9af665444556afa9c6e326041cfd0f
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-07 09:12:12 +00:00
Christian Stenger
2f8b4b3fbf AutoTest: Move test framework related code...
...into files and respective sub folders.

Change-Id: Ic80d693bd73993a6e74b6d422349e47276e8cb6e
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-01 11:37:32 +00:00