Reporting finished on the future will call onFinished()
due to respective connections.
Removing the additional explicit call to onFinished() to
avoid creating test marks twice.
Change-Id: I3d1a6b0b37bb5152c867a1c8fa488258c9b44268
Reviewed-by: David Schulz <david.schulz@qt.io>
Latest refactoring brought up a new pattern for
creating and using the fake future.
Follow the same pattern at older occurrence.
Change-Id: I4db4b3e6b0558660ef416e4201a017acba3de538
Reviewed-by: David Schulz <david.schulz@qt.io>
As all Runnables are known to be StandardRunnables, this here
essentially replaces all .is<StandardRunnable> by 'true'.
.as<StandardRunnable> by no-op, and fixes the fallout.
Change-Id: I1632f8e164fa0a9dff063df47a9e191fdf7bbb2e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Qt5.5 introduced a hard limit of 5 minutes for the test
case run.
If the timeout configured inside the settings is higher
and the test case runs longer than the the internal
default the test would crash ignoring the timeout set
by the user. Qt5.6.1 fixed this by adding a capability
to raise this limit.
Handle the hard limit used inside QTest appropriate.
Task-number: QTCREATORBUG-20439
Change-Id: I33f1d9bce4e503be7175228dde50b4484e57d337
Reviewed-by: David Schulz <david.schulz@qt.io>
Removing the event loop and the costly internal
infinite loop to reduce CPU load.
We need an event loop for on-the-fly processing
of the results, but the main event loop is good
enough for this. There is no need to add another
one.
There is also no need to put all this into an
asynchronous job as all of this happens
asynchronously anyway by using signals and slots.
Task-number: QTCREATORBUG-20439
Change-Id: I126bf0c1be3e49fd0dd477e161e4fe7a10a080c9
Reviewed-by: David Schulz <david.schulz@qt.io>
Set an appropriate identifier for the output reader
to ensure that children are correctly appended to their
parents.
Change-Id: Id51c16fdd2e50e1ba11d7fbd1f7abbef386bdae0
Reviewed-by: David Schulz <david.schulz@qt.io>
Some special characters need to get masked if passed
on the commandline.
Task-number: QTCREATORBUG-19943
Change-Id: Ib20ccb33ee9fbb50819d3386905df536c5193b3c
Reviewed-by: David Schulz <david.schulz@qt.io>
It's the more common pattern nowadays, and cheaper.
Change-Id: If6217b2a820fbfa6f088fd9349225f5f8488f593
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Let the output reader report crashes of the test
instead of just reporting crashes globally.
This allows to reflect the crash also inside summary items
to avoid having tests displayed as passed if no fail happened
until the crash.
Task-number: QTCREATORBUG-19565
Change-Id: Idd9fe28f7486cbb31b1aa6556530718a2278722f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The test executable of the process must be set before creating
an instance of the output reader as the process' command file
path is only read on construction.
This lead to wrong ordering inside the result model at least for
the first test case.
Change-Id: I4140ee02c8e2ea4105d276017a460676514abc91
Reviewed-by: David Schulz <david.schulz@qt.io>
If there is no information regarding the tests to provide to
the user 'unknown' is not helpful either. Just give no hint if
we do not have any.
While at it ensure to provide only non-empty information.
Change-Id: Ia1667c2cfd35b0456bfd47c2d4a14ed4d0000a4d
Reviewed-by: David Schulz <david.schulz@qt.io>
If we cannot determine which executable to run we ask the
user to specify which run configuration to use, but if there
is only a single run configuration assume this one as
correct and just pick it up without asking the user
every time.
Task-number: QTCREATORBUG-19200
Change-Id: Ie45cf354b595bc666a595f51844ad2453655e0da
Reviewed-by: David Schulz <david.schulz@qt.io>
If the test executable cannot be started or it seems
not to be the correct one or wrong arguments have been
passed to it the user now gets a respective message
inside the results pane.
Task-number: QTCREATORBUG-18955
Change-Id: Ica68cdbb9e401c8d48a9ce8b23b65d5410d2075a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
If a test configuration cannot be guessed correctly and the
user cancels the dialog to select the correct runnable we still
have no valid executable.
Deselect the respective configuration for the current test run
and avoid warnings regarding empty executable.
Change-Id: I843bf2844a5530be047c142805992a5fb79cbc19
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
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>
There are several complex project layouts that lead to failing
to determine the correct runnable for tests.
If this happens prompt the user for the runnable to use instead
of performing wild guesses or blindly using a wrong one.
Task-number: QTCREATORBUG-17882
Task-number: QTCREATORBUG-18922
Task-number: QTCREATORBUG-18932
Change-Id: I1575f310c450e56c087f1e689d0fc7dfb0cd0bef
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Arguments specified for run configurations were
ignored so far, but sometimes it might help to process
them. Add the possibility and a respective setting
to be able to pass arguments to the test run.
Task-number: QTCREATORBUG-17630
Change-Id: Ie64b784e8477efa02f50ce6b4cf3e55864952880
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Move used enums more central to avoid duplicating
information and unify their usages.
Change-Id: I33e9bdc11f7da16ecabf03991b5a5f550a53bdad
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The users (typically target specific DebuggerRunTool derived classes)
are meant to use the individual setter functions nowadays, not the set
up the full structure, so the members are a true implementation
detail now.
Change-Id: Ida04801e3230a2fe8bbadde8845e58c3077c87a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
When executing tests in debug mode the results are not displayed
as usual in the test result pane. In debug mode a newline character
is added to each line before passing it to the outputreader. The regular
expressions used in the GTest- and QtTestOutputReader do not match
because of the newline character.
Change-Id: Ia8051497097c950b5cf2d64cd4de0cb425802c50
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Also, add context to connect() expressions where we are or were
capturing "this".
Change-Id: I6e006ba6f83d532478018550d148ee93eca59605
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Let the workers keep track of errors instead of passing around
string pointers in some but not all interesting places.
Change-Id: I3956bc947a50747dd3a0c9302b9f9873d192e9c6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Not needed anymore, effectively replaced by RunWorker start/stop.
Change-Id: I7483c841cdd4e05c9e1f7636a27b20ece37947c2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
Aim is to replace it with its ProjectExplorer::RunControl base.
Change-Id: I30f837050e7c016887dc4b6cfef10b947f4f88ed
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
It is redundant, as a RunControl has a runMode() getter.
Change-Id: Ia048b271a5003356d21f86a3f778827d23466037
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
If a test case cannot be started or does crash while executing
these information might help to sort out configuration problems.
Change-Id: I406d5e69475d05931d4c4c4738f8528c6d74c585
Reviewed-by: David Schulz <david.schulz@qt.io>
The same functionality is available by using signals of the RunControl.
This reverts ca3bcd81 partially.
Change-Id: Id1d4d6e8326be60cdbe7c862dab46f49dbc6abe7
Reviewed-by: hjk <hjk@qt.io>
The check whether to emit a warning regarding guessed
configurations must get evaluated after the configuration
has been completed otherwise the guessed flag would be
always false.
Change-Id: I20e6dcdfff5110d4d9128ffcc97cba1a70f44fe9
Reviewed-by: David Schulz <david.schulz@qt.io>
* remove unnecessary QLatin1String where possible
* foreach
* nullptr
* bad naming of static members
Change-Id: If0f7c6839be4d2efbfef6f7f0775d2034775bd90
Reviewed-by: David Schulz <david.schulz@qt.io>
At least display results for using gdb or lldb and inform
user that we are not able to do so when using cdb.
Task-number: QTCREATORBUG-16693
Change-Id: I1a98a79aaf76de47b5dcb58d4dca9247f1642d36
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>