Commit Graph

38 Commits

Author SHA1 Message Date
Christian Stenger
ac2d5d761d AutoTest: Fix handling of test results
Broke with d05c5b7d07. The id is
used to identify the application running a test or a global
message like some warnings or the information regarding the
current running test.
Fixes its usage and its display inside the results pane.

In the amended patch the assumption that if the m_id is empty
it corresponds to nullptr TestResultPtr was apparently wrong.
This patch fixes it so that the default c'tor of TestResult
always creates an invalid result, so that it corresponds now
to nullptr TestResultPtr.

Amends d05c5b7d07

Change-Id: I9949aec3fc2b7354de149433b7127933f2d9bf21
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-24 08:38:54 +00:00
Jarek Kobus
bc3ebef7ce AutoTest: Use using namespace Utils more often
Change-Id: I9d20cd3496c4719d58a977f8fd53253c86d55463
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-27 09:51:55 +00:00
Jarek Kobus
d05c5b7d07 AutoTest: Use TestResult as value type
Don't construct it on heap and don't use shared pointer for it.

Change-Id: I51c9da405ed14d24b5f20242b4d049f9e2958f09
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-27 09:51:34 +00:00
Jarek Kobus
18aebc785f TestResult: Change semantic for createIntermediateResultFor
Don't pass the other test result into createIntermediateResultFor().
Rename it to createIntermediateResult() and create a new result based
on this object. Fix the caller so that it calls
createIntermediateResult() for previously passed "other".

Change-Id: I2c87cee1daa4f400c867852d071bd5c91b84dfd5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-25 09:35:39 +00:00
Jarek Kobus
f9090dab0c TestResult: Devirtualize the class - part 5 of 5
Step 5 - implement createResultHook.

Change-Id: Ibe81fb93c8c1c12d1af458d0f9707d02864febd8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-25 09:35:28 +00:00
Jarek Kobus
2b99ba1db7 TestResult: Devirtualize the class - part 4 of 5
Step 4 - implement intermediateHook.

Change-Id: I2a0d921cc16b109fd6f72c3831d0564c761bb006
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-25 09:35:18 +00:00
Jarek Kobus
b1ef25b208 TestResult: Devirtualize the class - part 3 of 5
Step 3 - implement directParentHook.

Change-Id: I87518e700e9019ccd5b8a095b23971ae26eb776e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-23 12:43:17 +00:00
Jarek Kobus
01faf0843d TestResult: Devirtualize the class - part 2 of 5
Step 2 - implement findTestItemHook.

Change-Id: Iabc843740343e549f79b02f74f94f5b1b4713af3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-20 14:18:32 +00:00
Jarek Kobus
6eb14c66c7 TestResult: Make createIntermediateResultFor() a const method
Change-Id: I60dc08117504611857885668d1ad0d565a0ee020
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-20 13:20:53 +00:00
Jarek Kobus
d03c4f77c9 TestResult: Devirtualize the class - part 1 of 5
The goal is to make the TestResult a value type without a need
to create these objects on heap.

Introduce a ResultHooks class that will replace all 5 virtual
methods.

Step 1 - implement outputStringHook.

Reorder constructor arguments of TestResult's subclasses so that
the first 2 args are always: id and name.

Change-Id: Iae93e5a348328414f057d1471afad8020b3c1171
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-20 13:20:39 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Christian Stenger
239a59c596 AutoTest: Introduce ITestConfiguration
Preparation for an additional simpler test configuration
which needs to have the same common base.

Change-Id: I1800ed5d7301f1aea99eba6ef588a204697bd569
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-16 08:10:04 +00:00
Christian Stenger
e87088f3e9 AutoTest: Add error as test result type
Task-number: QTCREATORBUG-23354
Change-Id: Iaeabfc6eedf18c52dc9bdc59833e213a09458617
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-12-16 06:27:48 +00:00
Christian Stenger
03b80025a9 AutoTest: Shuffle namespaces for clearer separation
Change-Id: I6ac440c6d72c3d0dbcd75907f8a6ae756f3cf5ee
Reviewed-by: hjk <hjk@qt.io>
2019-09-02 09:04:16 +00:00
Christian Stenger
0576e419e3 AutoTest: Redo evaluation of result summary items
By moving this functionality completely into the tree item
it is possible to eliminate superfluous enum values that
basically represented the same item but in different states.

Change-Id: I2e6b6462bbaae51bdf6822fde198aea36f951c7f
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-04-29 13:06:31 +00:00
Christian Stenger
cbab457cf4 AutoTest: Refactor TestResult
* use enum class
* remove superfluous enum value
* remove superfluous subclass
* remove superfluous constructors
* simplify handling

Change-Id: Iecf11e62eb842c9d455d9238939244496f6b66f4
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-04-26 12:19:05 +00:00
Christian Stenger
1a58a30685 AutoTest: Allow grouping of results by application
Add an option to group test results by the application
that contains the test cases.

Fixes: QTCREATORBUG-21740
Change-Id: If4e5c8118cd5dd81b1b75891b4eca85b08e76848
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-05 08:57:35 +00:00
Christian Stenger
0af0f58a60 AutoTest: Support blacklisted XPass and XFail
Blacklisted XPass and blacklisted XFail have been added to
QTest. Add the respective handling to the plugin.

Change-Id: I96b85fa045bdf51abd8e295b075f9ab1ed95eb66
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-01-30 06:46:35 +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
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
06b717bb16 AutoTest: Handle qCritical also for text based output
Task-number: QTCREATORBUG-19795
Change-Id: I0bbfecd4002df1958a3fc5cd795e193b1cb83cbd
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-13 12:54:35 +00:00
Claus Steuer
4c04cff7c1 AutoTest: Test execution from result output pane
Enable test execution via context menu in the result output pane.
At the moment only gtest is supported.

Task-number: QTCREATORBUG-16695
Change-Id: Ib39164c3cb44d249647b11e25dc51c9ac5db89c5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-27 09:47:28 +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
cc8bff67b3 AutoTest: Support plaintext output for Qt tests
Change-Id: I88ec477777d79c69e699dd906ec4ef1550bcaf44
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-06-30 11:49:43 +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
Christian Stenger
183cd8ce99 AutoTest: Use result type string also for summary items
But use a grey'ish color to explicitly mark them as summary
items as they are no real test results.

Change-Id: I7e682a7753e8467e6ec65ac09fb27a7b798d765f
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-08 05:39:45 +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
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
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
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
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
Christian Stenger
1584328da9 AutoTest: Add some theming support for results pane
Change-Id: I6641dc92d54ea20263656fa77157d7d853cf0287
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-03-17 10:21:26 +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