Commit Graph

66 Commits

Author SHA1 Message Date
Orgad Shaneh
4b6a6acc4e Core: De-pure IOutputPane::visibilityChanged()
Most implementations are empty.

Change-Id: I811cacfc2918c8b2803798c4f5d3dabc7d60ccd1
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
2020-10-09 05:23:17 +00:00
Christian Stenger
f849bd1105 AutoTest: Support run failed
If the last run had failures and the test frameworks
support matching a test result to a test tree item
give the user an easy way to re-run all failed tests.

Change-Id: I4f3150ca8a6514c09cf7ca819f84e38c6419a310
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-09-16 06:54:02 +00:00
Alessandro Portale
bb89b80097 AutoTest: performance-for-range-copy
Change-Id: I60e79aec1fe2813867d8ff46cec7d39b848d0020
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-12 07:01:10 +00:00
Christian Stenger
f188622704 AutoTest: Re-use established code
Instead of "parsing", modifying and highlighting the text
after it has been added use existing code to get formatted
code beforehand.

Change-Id: I33be2950f9b9a6910ad80b10b132089f4e5f0b1c
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-01-08 14:10:26 +00:00
Eike Ziller
4e6142c932 Merge remote-tracking branch 'origin/4.11'
Conflicts:
	src/plugins/autotest/testresultspane.cpp
	src/plugins/cmakeprojectmanager/cmaketool.cpp

Change-Id: Iade695ac9cab8bf3e3a1abd6e2c71f4a19132ac0
2019-11-21 22:18:35 +02:00
Christian Stenger
26e2572852 AutoTest: Fix font for results pane
Use a correct font on macOS as well.
Beside this there had been strange observation made
when zooming the command line output.

Change-Id: I8b8cdd0d76e415da4bc792b0d646154cfc8fde9d
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-11-19 05:45:48 +00:00
Christian Stenger
333b8f9812 AutoTest: Allow colored commandline output
Some test frameworks allow to print their output colorful
to further indicate meanings of messages or test results.
Provide a highlighter for the textual output of the results
and enable this functionality for GTest and Boost UTF.
Keep at least a small backdoor for overwriting this by
the user.

Fixes: QTCREATORBUG-22297
Change-Id: Iddd2b734416de807635d90c6519553081f7372f2
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-11-13 13:09:00 +00:00
Christian Stenger
e58f376068 AutoTest: Tweak output handling
..to be able to distinguish between the output
channels. Some test frameworks use the stderr
stream for printing relevant output.
This is a preparation for coloring the output
correctly later on.

Change-Id: I3bfea9e552bde3621df99611a124b4f2d3b7d1da
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-11-13 13:07:35 +00:00
Christian Stenger
2c7e769e31 AutoTest: Clear up and generalize
Instead of transforming forth and back the output
try to handle the output once correctly and pass it
line-wise around.
This also ensures that we always get a single line
when appending the output which will be necessary
later on.

Change-Id: I3e9c6db5f81172997dfe566eee9a86bfe2f17a1f
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-11-13 13:07:25 +00:00
Sona Kurazyan
8e31932c29 Remove usages of deprecated APIs of QLayout
Replaced:
  QLayout::setMargin() -> QLayout::setContentsMargins()
  QLayout::margin() -> QLayout::getContentsMargins()

Task-number: QTBUG-76491
Change-Id: If28ef6910b3afe5d04e4746b74f9362a3e3b3c8e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-02 13:01:07 +00:00
Christian Stenger
265498cadc AutoTest: De-noise code a bit
Change-Id: I4585ebfb53623221c713ab0e8e254ba59a4e5920
Reviewed-by: hjk <hjk@qt.io>
2019-09-02 09:04:28 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
Eike Ziller
4545c81e57 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	doc/src/howto/creator-sidebar-views.qdoc
	doc/src/howto/creator-ui.qdoc
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/autotest/testresultmodel.cpp
	src/plugins/autotest/testresultmodel.h

Change-Id: I24cc585ca7782cb1d9cb0b8b73b46892b41937fd
2019-05-08 12:41:25 +02: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
Alessandro Portale
e9cf8a4e3e Remove a couple of "setAutoRaise(true)" for toolbar buttons
Most of the QToolButtons in the toolbars don't set autoRaise, and they
are fine. I assume that those who do set it, just do it for because that
line was copy/pasted so often.

Change-Id: I71341ddbd26a586d34713661ec538b37033685e5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-04-29 10:35:33 +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
a182478d94 AutoTest: Fix uncheck all filter
Change-Id: I0fe6b95b0aebc723f57546e796650cea4d3fd8d4
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-04-23 06:38:07 +00:00
Christian Stenger
19f2da8048 AutoTest: Redo reporting of disabled tests
Provide a proper way of reporting disabled tests instead
of the hacky one.

Change-Id: Id3a775d57ac20c9db8ad0f504cb708021117aa2f
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-04-03 08:11:57 +00:00
Christian Stenger
6dee2dc019 AutoTest: Make automatic popup of results pane configurable
Let the test results pane automatically popup before the
first test result is added to indicate running the tests
has started.
Beside this provide settings for enabling or disabling
the popup of the results pane on start or finish of a
test run and make it possible to limit the automatic
popup on finish to failed test runs.

Change-Id: Ib22735536effd9f2330b39a7d2830c97839eb21f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-03-20 05:49:33 +00:00
Christian Stenger
113260c8d0 AutoTest: Count blacklisted tests correctly
Amends 0af0f58a60.

Change-Id: I646b98fda5d1292a46a85e11a09506875e8a1606
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-02-06 08:43:40 +00:00
Christian Stenger
4fcc45716d AutoTest: Display number of skipped in summary
If a test run had skipped tests display count of them
on the summary as well.

Change-Id: Icfc573a4bea4f3081d61767068f151814b8c4033
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-01-09 05:43:07 +00:00
Eike Ziller
04a4bacbf9 Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/coreplugin/dialogs/externaltoolconfig.ui

Change-Id: Ie38e9028cee599578c59b22325d85c097335243e
2019-01-07 13:24:12 +01:00
Andre Hartmann
5ed848fd8f Autotest: Fix displaying UTF-8 characters in text output pane
Fixes: QTCREATORBUG-21782
Change-Id: I0533a1f616d0fee6b7d22ca9854dc992eb4622a4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-01-07 09:24:53 +00:00
Christian Stenger
63d88450ec AutoTest: Provide 'Uncheck All' for filters
'Check All' is provided since filtering is possible, so
provide the opposite as well to avoid unnecessary clicks.

Change-Id: Id7b695e79e8ce57a6548a8581205cafdad2b2cb9
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-12-17 06:35:32 +00:00
Christian Stenger
1cfaa828a8 AutoTest: Fix outputparser
This patch amends 3056105c66. This patch fixes
handling of output while debugging and appending
to the "real" output if the user interacts with
the output while the test is running.

Change-Id: I1db54382f1df3e2b9a5a860002aac8fb208ee5b9
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-11-08 06:33:09 +00:00
Christian Stenger
3056105c66 AutoTest: Fix displaying XML content
CDATA sections that have line breaks at their line ends
within a multiline CDATA section should get handled
that these (inner) line breaks do not get lost.
This patch fixes displaying failed Qt tests when using
the XML output.

Change-Id: I3aa7100836613372ac5b2b409c5cfacfb34209ba
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-11-06 09:40:18 +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
7a8e6b052e AutoTest: Disable run related items while executing tests
While executing tests it had been possible to trigger another
run when using the context menu on one of the result items
inside the results pane. Prohibit it at first hand instead of
running into a soft assert later on.

Change-Id: Ib5a4ca53a2605d12f6539fd68aee099211f12174
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-08-20 06:26:48 +00:00
Sergey Morozov
57edd22d11 AutoTest: Add action to run all tests from current file
Run specific test functions since one test case can be implemented in multiple files.

Task-number: QTCREATORBUG-20329
Change-Id: I07f435c264f18e9608caa5b7ee20dff2d33ee9c0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-15 14:41:53 +00:00
Sergey Morozov
743a37dda2 Autotest: Add editor's mark for test's failed assertion
Tooltip shows failure details. Click navigates to test results pane.

Task-number: QTCREATORBUG-20328
Change-Id: I47ffaef1f035dfc5b244644a099e1c7d8db6715b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-07 18:28:15 +00:00
Christian Stenger
fccff5982f AutoTest: Reflect fatals on badge as well
So far only fails and unexpected passes had been counted
as issues for the badge number. If there are only passes
but at least one fatal you did not notice this until you
have opened the results pane.

Change-Id: I48e93850e56a5bc77e4a9ba2c35e3653ec24b19e
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-04-23 06:35:07 +00:00
Christian Stenger
0bd6f712f0 AutoTest: Access plugin singleton through static functions
It's the more common pattern nowadays, and cheaper.

Change-Id: If6217b2a820fbfa6f088fd9349225f5f8488f593
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-01 09:51:54 +00:00
Christian Stenger
dc1e6519a6 AutoTest: Consolidate handling of global menu items
Change-Id: I6ad07775d63206864ec330ad87d3b65e5ecaf76c
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-19 08:57:31 +00:00
Christian Stenger
96da2973c3 AutoTest: Clear cached information before running
We cache the last processed model index as well as the used
font. In some cases the cached information interfered with
new information and ended up in an ugly painting issue
where old information partially got repainted instead of
using the new. Clear cached information when starting a new
run to avoid this.

Change-Id: Ibb01e5e3bdd7b542325b5867d37c677d31a14aae
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-13 12:08:18 +00:00
Christian Stenger
1fa26bd9b3 AutoTest: Restrict Run and Debug from results pane
Ensure to enable Run and Debug from results pane only for
items that are in fact capable to get re-run and debugged.
Preparation for enabling the functionality for QTest and
Quick Tests.

Change-Id: I7ec28e51ae7c9caa462023d55443bd3194ae81dd
Reviewed-by: Claus Steuer <claus755@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-10-06 08:48:20 +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
8288eadac6 AutoTest: Unify handling of run modes
Move used enums more central to avoid duplicating
information and unify their usages.

Change-Id: I33e9bdc11f7da16ecabf03991b5a5f550a53bdad
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-09-18 10:01:18 +00:00
Orgad Shaneh
687466ac47 Merge remote-tracking branch 'origin/4.3'
Change-Id: I126f3a05212a3d5df78812e66285bc9e8078360b
2017-06-20 11:32:02 +03:00
Christian Stenger
ea86ff5eb0 AutoTest: Avoid triggering run tests while building
Disable respective actions while a build is running to avoid strange
side-effects or race conditions.

Change-Id: Ifc8d1c9fc9fd4d705cabd148b145708e23029dba
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-06-19 06:59:08 +00:00
Christian Stenger
c1555b1d7e AutoTest: Provide way to access the original test output
When running tests the original output is processed and not presented
to the user at all. For crashing tests this could mean that output
was not able to get processed completely (e.g. when having XML as
output and relying on well-formed code)
Unhandled output could also lead to incorrect results.
This patch adds another view to the results pane which contains
the complete output of the last test run.

Change-Id: I923496e9c440de4ea68bee55415777ea5c2379c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-06-13 12:50:22 +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
8415a7984c AutoTest: Unify background color of results pane
Change-Id: I0868fe35414a4215cff2f5f6b541aada91c03a39
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-08 05:39:59 +00:00
Thomas Hartmann
f446fdc077 Fixing capitalisation of titles
Change-Id: I6a915cc69fe1cf6630d1a9a0fdb6b7a8d39b306c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-01-18 13:41:38 +00:00
Eike Ziller
589fedf455 Merge remote-tracking branch 'origin/4.2'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/projectexplorer/kitinformation.cpp

Change-Id: I94299b069418586db97d1d596a252794e4037556
2016-12-20 17:14:19 +01:00
Christian Stenger
6c4840a4ff AutoTest: Avoid fetching result for invalid index
Change-Id: If8dc37d20b2b7f684a88bde23f9b1b18144bacdb
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-12-19 09:22:06 +00:00
Christian Stenger
69a94c2c28 AutoTest: Always parse if plugin is enabled
Remove the 'Always parse' setting and respective special handling.
This simplifies the handling of parsing for tests and removes
strange special handling that was introduced in earlier versions
and led more to confusion on the user side.

Change-Id: Ia4d122ed448244f3cb3876dda9930864afde9c28
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-12-12 10:57:47 +00:00
Christian Stenger
05fa0cc0db AutoTest: Let results pane only pop up on finish
It is quite annoying if one minimizes results pane while a long
test is running and for each result item the pane comes up again.

Change-Id: I7020ae698cd61df01ed5b1402cc06d26fb018978
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-24 11:47:29 +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