Preparation for having code based and build system based
test items.
Task-number: QTCREATORBUG-23332
Change-Id: I4d21142d74b40b988d82c69d02f5c6633c8cebe4
Reviewed-by: David Schulz <david.schulz@qt.io>
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>
Mark test tree items as failed for the last run
to be able to re-run them in an easier way.
Change-Id: I7ea3dcd16e5a02797d41f13e02b2fa95b857cf5e
Reviewed-by: David Schulz <david.schulz@qt.io>
If the process of the test executable cannot be started
for whatever reason we will not have an active run
configuration or output reader.
Change-Id: I50146a2c8228ad39574e007ae2659465122ad20b
Reviewed-by: David Schulz <david.schulz@qt.io>
Make them plugin-pimpl data members, removing some indirections.
Change-Id: Ie441ac94a27f07342513b0b5b1437ccfe4b5d7d2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Presumably, they were intended for output that shouldn't get an
automatic newline, but if there ever was such a thing as automatic
newlines, it must have evaporated over time. All users of
OutputFormatter provide a newline if they want one.
Change-Id: Ibd219b7305fd503ce075d6f77930d2b538d5e2e8
Reviewed-by: hjk <hjk@qt.io>
Re-triggering runOrDebugTests() should be done
only once to avoid the test runner interfering
itself and crashing QC.
Amends 0f60f120d2.
Change-Id: I49f666f2c96730729ef54d8d8781d4058b3e0cca
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
When opening or creating a project for the first time the
executable path of the application targets may be empty
until the build system has updated this after the first
successful build.
This update happens asynchronously, so we might need to
postpone the test execution a bit and wait for the
respective update.
Change-Id: I63b5c45f6ecb194020ea36bbb5c9486a4dcc004c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Do set the global application flag AA_DisableWindowContextHelpButton
to avoid having to unset the default WindowContextHelpButtonHint
in every single dialog.
AA_DisableWindowContextHelpButton was added in Qt 5.10.
Change-Id: I21fe8bc5ddfa4c01ec7a799b04bfb6ff1c9d6d86
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The projectexplorer.cpp file is a huge mixed bag, which could use some
cleaning up. The queue() function is very much related to the
BuildManager, so move it there.
Change-Id: Ibc6425cc27d44514803a5e7c6139f83ddd760382
Reviewed-by: hjk <hjk@qt.io>
If the Debugger gets into a corrupted state and is not
stopable cleanly we do not get the stopped signal.
This in turn leaves the test runner in an inconsistent
state which cannot be reset except with a restart of Qt Creator.
Fixes: QTCREATORBUG-23298
Change-Id: I9d7e7cbc847f8883d2e750f4436c5ef281106d3a
Reviewed-by: David Schulz <david.schulz@qt.io>
... instead of the entire project.
This can speed up the development cycle by ignoring irrelevant changes
in the project, potentially at the cost of missing parts that actually
should be re-built (in particular with build systems where a product
does not have full knowledge of its dependencies).
Supported by qmake and qbs for now.
Change-Id: Ic7101aa243e92ba139798d13366d256c1919dcc3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
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>
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>
This may help for issues which are not easily
reproducible.
Change-Id: If8063c51f69bd24f12afdcdd0648790f1a0668da
Reviewed-by: David Schulz <david.schulz@qt.io>
Make it possible to distinguish between all and selected
test cases also for the automatic run after build feature.
Change-Id: I91715a7ae4f09cea2e31844940a6b21ae9e62157
Reviewed-by: David Schulz <david.schulz@qt.io>
It might make more sense to be able to enable this
per project instead of globally.
Task-number: QTCREATORBUG-16704
Change-Id: I2e29d3af62c428bcbb534b72b5eb13f1fbd83973
Reviewed-by: David Schulz <david.schulz@qt.io>
Add an option to automatically run tests if the build
succeeded and the current project has tests.
Change-Id: I1fe028be84279b9b488f78590565c6d4b0449e34
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
The progress bar widget gets automatically closed if the
underlying future reports that it has finished or got
canceled. This patch ensures to emit the respective signal.
Fixes: QTCREATORBUG-22699
Change-Id: I5c7d2169194e90165fb1c90831cf69c02e029268
Reviewed-by: David Schulz <david.schulz@qt.io>
Refactor much of the code from Environment* classes to NameValue* classes
to share it with the preprocessor macro settings.
Change-Id: Ica4ee817aa338230c422b30d91240d266248d226
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Depending on the report and log level of Boost UTF
the number of test passes and fails might be wrong.
Circumvent by providing a way to report a summary.
Change-Id: I6d2cb7674550f10a0263e08d21cce42569f3d7a8
Reviewed-by: David Schulz <david.schulz@qt.io>
Provide a proper way of reporting disabled tests instead
of the hacky one.
Change-Id: Id3a775d57ac20c9db8ad0f504cb708021117aa2f
Reviewed-by: David Schulz <david.schulz@qt.io>
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>
Into a trivial bit and two setters. Plan is to use it only with information
that is truly there (e.g. kit/device only) at the user side without having
to invent a RunConfiguration "handle".
Also remove some dead code in the test runner.
Change-Id: I987881e41722178b14b91f973b84cbdb67a9f85e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Use a signal directly now, the users know the caller.
Change-Id: Ib2ff4dbe3047eddf2a060eef060b487a4c17e78c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Mainly to get rid of the QProcess::finished deprecation warning.
Also adjust coding style in the surrounding connects when needed.
Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The name "KitInformation" does not properly convey the fact that it
represents a certain *aspect* of a kit. The same goes for
"KitConfigWidget", which in addition was inconsistent with
"KitInformation".
We now use "KitAspect" and "KitAspectWidget".
Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97
Reviewed-by: hjk <hjk@qt.io>
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>
Word order might be different in other languages
Change-Id: If0f02ab768529887904a4cbed379d3061b9b659a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
In some special setups it is almost impossible to get the right
executable or run configuration. For bigger projects this can
become a pain point when trying to execute tests and always
getting asked which one to run.
So, allow remembering the choice and use it if appropriate.
The cached information is not stored permanently.
Resetting of the cached information can also be triggered by
switching or closing the current project and inside the settings.
Task-number: QTCREATORBUG-20859
Change-Id: If416ea0ae9ad3548daca2ffcf5888fd568fd2622
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
If the timeout triggered a cancellation of a test run the
testrunner missed to inform the progress manager about this.
This in turn resulted in a sticky progress widget which even
could pile up with further progress widgets.
Fix this by explicitly informing the progress manager of the
cancellation.
Change-Id: Ie19a1aa998e19f911cd0dd856008552baaffeb9b
Reviewed-by: David Schulz <david.schulz@qt.io>
If there are environment variables that might interfere with
the test process filter them out before setting the environment
for the test process as they can - in the worst case - even
lead to being not able to execute the test application at all.
Task-number: QTCREATORBUG-21012
Change-Id: I4a2059cf527395498824a0914fd6c3203eca9bcf
Reviewed-by: David Schulz <david.schulz@qt.io>
Adding the same widget to two different layouts obviously
does not work. Create two separate widgets for this.
Change-Id: I1c598d7ac45b7a13cea129a444697d64a607f243
Reviewed-by: David Schulz <david.schulz@qt.io>
Rename function and parameter to better reflect what it is
and remove code that has been superseded some time ago.
Change-Id: Id7af2e916217b4da6c96f75bbe036fdc4b8d9ddc
Reviewed-by: David Schulz <david.schulz@qt.io>