Commit Graph

35 Commits

Author SHA1 Message Date
Christian Stenger
7d779bad7c AutoTest: Fix icons for results pane
Summary items with type pass or fail including warnings
had wrong or no icon at all.

Change-Id: I2ce3c7c8f0c9c93e80809281ede0aba17fc59e82
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-10-01 07:25:20 +00:00
Orgad Shaneh
12e253df9d AutoTest: Remove usages of deprecated QModelIndex::child
Change-Id: I8b310a54d6c1a044c94edac8fd67dfa8b2fcfb91
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-09-21 04:48:27 +00:00
Sergey Morozov
db85693690 AutoTest: Create tree item for each failure
Introduce special location item for this purpose.

Task-number: QTCREATORBUG-20967
Change-Id: Icb6c6ec8ff9d2e4e8e3d13834427bae50d74bd2a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-29 16:57:05 +00:00
Christian Stenger
1d894c0f7a AutoTest: Code cosmetics
* use nullptr
* override
* remove old style casts
* fix most of the code model warnings

Change-Id: Ia08e846f9326ae28ca7e7d66748e25a8b817b9b1
Reviewed-by: Xing Xiong
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-07-20 08:34:48 +00:00
Christian Stenger
ad8e67cea3 AutoTest: Code cosmetics
Change-Id: I49a73b83b1b6857c34913db8f7c6818cf7a1a129
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-06-19 07:40:09 +00:00
Christian Stenger
78bd3f9ec3 AutoTest: Rename results executable
Rename member to better reflect its meaning. It is used
as an identifier and might be something else than an
executable.

Change-Id: I082e3caaa3d94fcd7ab26ebc43bb0eb6da136d57
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-15 05:28:45 +00:00
Christian Stenger
e7a71672be AutoTest: Treat critical messages as warnings when filtering
Task-number: QTCREATORBUG-19795
Change-Id: Id314bd08af0e909fe717af6de836fc2aa451dea0
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-13 13:30:27 +00:00
Christian Stenger
e6f2d19b26 AutoTest: Handle qCritical similar to warning
If a test passes but produces qCritical() messages do
not display the test as failed, but as a pass with
warning instead.

Task-number: QTCREATORBUG-19795
Change-Id: Ied3f0ad38b96c87ea93f765db802ea0293f63544
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-13 12:54:40 +00:00
Christian Stenger
e4eb4c3d0f AutoTest: Correct updating of summary items
If we get no finish message for a test case or function
we did not update the result of the summary item.
This patch fixes this and also updates the respective
parents accordingly.

Change-Id: I98a8c69735f89d592f6152dbbc7a632e285c3a4d
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-01-10 06:06:50 +00:00
Christian Stenger
b4ca318383 AutoTest: Improve test results summary items display
Instead of letting warn prevail over pass and fail over
warn just add warn as additional visual marker at the icons
and keep the original test result.

Task-number: QTCREATORBUG-18311
Change-Id: Ia67288fa84598b02c20fc1019799b1bb9282d63e
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-24 11:05:21 +00:00
Christian Stenger
625129d29c AutoTest: Fix appending test results with the same name
If two test cases had the same name but came from a different
executable the results pane still might have shown any later one
(badly) cascaded inside the first one. Avoid this by providing
an additional unique information (the respective executable for
the test case)

Task-number: QTCREATORBUG-18502
Change-Id: Ib071e389758b6269a9a90cc4c4afbcf86ca583ac
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-24 11:05:08 +00:00
Christian Stenger
4edc715b1c AutoTest: Speed up finding parent items
We normally add new results to the last added
item, so processing the search for the parent
from bottom to top makes more sense and avoids
iterating over almost every item.

Change-Id: Iede08b9c0d4c80227d2e8fea9b002354f01d5b35
Reviewed-by: hjk <hjk@qt.io>
2017-06-30 11:36:44 +00:00
Tim Jenssen
3bc2ce1864 fix uint warning and use vector::reverse_iterator
Change-Id: I23b201dd3452c0c9581ec94928020838f0624573
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-01 09:43:18 +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
ae2c068e68 AutoTest: Fix handling of data tags in test results
Avoid adding test functions again and put further data tags
directly below the respective test function.

Change-Id: I29775b836cc4584358ee67b5f07744986c6a6591
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-17 08:01:15 +00:00
hjk
196dbbe0e7 Utils: Introduce TreeItem::{begin,end}
... and use this to reduce the number of explicit uses of m_children.

Despite of being shorter code by itself it is a step towards having
an explicit LeafItem object that doesn't explicitly store a(n empty)
vector of child nodes.

Change-Id: If8db85e2f1134dd1578a78d31235bf57a28f863a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-02-08 16:08:42 +00:00
Christian Stenger
d4e2d8fc49 AutoTest: Fix filtering of results
If we enforce an update of siblings we must inform the model that
something might have changed to have this propagated to the
filter model as well. It is not enough to emit dataChanged()
for the parent.

Change-Id: Ia260d9ad131dab307b7ded34e4c20f76ec625e97
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-01-26 12:28:11 +00:00
Christian Stenger
b9fc628bb9 AutoTest: Fix result tree for google test
Change-Id: I1f4a361a3c4ceb77c221d6549e42a1b7803ef305
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-01-03 07:01:37 +00:00
Christian Stenger
41ceac474b AutoTest: Avoid building tree of global items
Global items normally have no test name set. This patch avoids
adding global items below other global items.

Change-Id: Iabada78144ec48fc6687b360f79f1ef017c772a1
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-01-03 07:01:13 +00:00
Christian Stenger
cdd94cbb02 AutoTest: Make results tree a real tree
Provide a way to control how the results tree will be
generated for the respective test framework and use
this information to construct a real tree.
Basically this changes the layout of Qt test results,
but keeps the former layout of Google test results.

Task-number: QTCREATORBUG-17104
Change-Id: I7fca4d8e365bfebcca4cf7855cf6a882e5379143
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-12-09 11:33:27 +00:00
Christian Stenger
5b6e9671d7 AutoTest: Small refactoring of addTestResult()
Just some simplifications and restructuring.

Change-Id: I2a2a66808f1721e7ce9dc47e20194d544c093092
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-12-09 11:33:14 +00:00
Alessandro Portale
6d7bb54e77 AutoTest: Use themed test result icons
Task-number: QTCREATORBUG-16663
Change-Id: I087024bf2882690233032e555a825e397c945d3e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-14 10:03:46 +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
8b579fca6a AutoTest: Remove unneeded method
We can completely rely on what is done in the base class.

Change-Id: I93b04d4de0d104b55db77c4791eec5a5ff20d621
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-09-29 12:14:03 +00:00
hjk
53415cece1 Utils: Streamline TreeModel API
The LeveledTreeModel case is general enough to cover
the UniformTreeModel case, so merge them and rename to
TreeModel. The former TreeModel is now BaseTreeModel.

BaseTreeModels should not be instantiated directly,
a tree model with non-uniform basic items is available
as TreeModel<>.

Done-with: Eike Ziller <eike.ziller@qt.io>
Change-Id: I64a65617ab68c0cde39cf65f4bc092ef808ee6fb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-27 08:00:40 +00:00
Christian Stenger
e51443ce62 AutoTest: Add handling for system messages
QTest uses special type for critical and for special internal messages.

Change-Id: I980b2ccd2913012be24183ea503247331eeb97e1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-07-15 09:18:13 +00:00
Christian Stenger
26799926cb AutoTest: Add qInfo handling
QTest can use qInfo() to print out additional information
which was ignored (with an internal warning).
Handle these messages the same way as qDebug().

Change-Id: I84106ab232580ec9066ea5fe0c03f3be8c6d0bfd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-07-11 11:03:18 +00:00
hjk
7b4c7d49a9 TreeModel: Introduce a destroyItem() convenience function
Shorthand for delete takeItem(...).

Change-Id: Icb7b60e5c19aa0d21650eefff65f7eb55e9f90b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-06 11:41:55 +00:00
Christian Stenger
d7dc7159b2 AutoTest: Filter out test case summary as well
If results are filtered and the filtering results in omitting
all entries of a test case filter out the test case as well.

Change-Id: Icd3b18566ed45a68b2ee630a2f13be80257f6b26
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-17 04:58:52 +00:00
Christian Stenger
87a6f003e9 AutoTest: Split off TestResult...
...to avoid dragging around members that are not used in sub-classes.

Change-Id: I3e30b403491b1ae9219a0b461c3034cb854701a6
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-05-12 13:49:00 +00:00
hjk
dee7ad3806 TreeModel: Rework tree iteration
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>
2016-05-12 12:30:36 +00:00
Christian Stenger
04cbf8b818 AutoTest: Support find in results pane
Change-Id: I899325dd87439d6bea22fa52aed640fa8158e113
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-29 10:19:27 +00:00
Christian Stenger
19c8c9bc4b AutoTest: Avoid passing around pointer without owner...
...when using signals and slots between threads.

Change-Id: Ib1ce607e225cb8d9973393c5bdaeebaa6e30bb41
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-26 09:55:48 +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
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