Commit Graph

21 Commits

Author SHA1 Message Date
Christian Stenger
66423bcb3e AutoTest: Fix parsing for Qt test
Broke with b6e12f4a.

Change-Id: If72b668b12cf9af7d154a8be8909a9c85645b457
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-09-18 10:38:39 +00:00
Marco Bubke
b6e12f4a1c Convert macros from plain QByteArray to a vector of structs
The old code model expected the macros as C++ formatted text
("#define Foo 42) but newer targets like the Clang codemodel expect key
value arguments like "-DFoo=42". So instead of parsing the text again and
again we use an abstract data description.

Task-number: QTCREATORBUG-17915
Change-Id: I0179fd13c48a581e91ee79bba9d42d501c26f19f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-14 15:23:56 +00:00
Christian Stenger
cccc6b37ec AutoTest: Remove not needed code
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>
2017-05-19 10:02:55 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
Christian Stenger
23398229e9 AutoTest: Modernize code
* remove unnecessary QLatin1String where possible
* foreach
* nullptr
* bad naming of static members

Change-Id: If0f7c6839be4d2efbfef6f7f0775d2034775bd90
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-17 08:01:36 +00:00
Christian Stenger
40174187cb AutoTest: Remove unnecessary indirection when creating test tree items
Change-Id: Id4648196011b6769a2cd51b4daee146068272f00
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-01-12 05:50:32 +00:00
Christian Stenger
92db5afba4 AutoTest: Handle re-implemented test functions appropriate
If a derived test case implements the same private slot as one of
its base classes one of these information got lost as both were
using the same key to store the information at.
Additionally take care of what is possible and sensible when using
QtTest and deriving test cases from others.

Task-number: QTCREATORBUG-17522
Change-Id: I0d2a47c820d5eb002f8bdd851a07a4774e9838f0
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-01-10 05:39:05 +00:00
Christian Stenger
572b04a00a AutoTest: Find data tags of inherited functions
Task-number: QTCREATORBUG-17522
Change-Id: I9fa1db3c2d7f338afe343fc835b9e3dbae353131
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-01-06 06:19:44 +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
4a634a23cf AutoTest: Find inherited Qt test methods
Task-number: QTCREATORBUG-17522
Change-Id: Ie7cfed2bd38944c28ea8502552593e0083f9727c
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-01-06 06:19:28 +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
9050f19046 AutoTest: Re-use snapshot instead of fetching it while visiting
Change-Id: Ia41da67cb1fa047473b84baebafdbcaf6586c7ae
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-11-07 12:05:27 +00:00
Christian Stenger
b0bf07c64a AutoTest: Modernize code a bit
Change-Id: Ie56f6e5cb8a4f1962bd8df5e57214911ae609921
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-09-29 12:27:14 +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
48b2af5e77 AutoTest: Cancel possible running tasks on shutdown
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>
2016-07-15 09:18:01 +00:00
Christian Stenger
72e6dd2ab1 AutoTest: Avoid fetching WorkingCopy from multiple threads
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>
2016-06-20 10:50:28 +00:00
Christian Stenger
e4ff33e622 AutoTest: Move function into framework related class
TestTreeModel::testCaseNamesForFiles() is a helper that is currently
needed only for handling the Qt test framework.
Move it down into Qt framework's helper class and make it static.

Change-Id: I03c377a76402593584870cbbdaa4621d19278443
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-09 11:52:19 +00:00
Christian Stenger
01747388d4 AutoTest: Pass parameter by reference and use framework id...
...for determining from which root node test cases names are needed.
Another preparation for introducing test frameworks.

Change-Id: I02910f3e4736d9be6e6822eea7863fc62252d4db
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-08 12:33:52 +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
af81016e64 AutoTest: Rename 'AutoTest*' to reflect what it is
AutoTest* is too generic within the context where it is used.
This patch renames respective classes, members and string occurrences.

Change-Id: Ie413e4a344ddaf7892ecf248ba486defb4b9e3ef
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-06 13:23:24 +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