Commit Graph

65 Commits

Author SHA1 Message Date
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
73d9c2fff3 AutoTest: Do not create marks twice
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>
2018-06-19 07:39:49 +00:00
Christian Stenger
38bc2358ac AutoTest: Use same pattern across file
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>
2018-05-28 06:39:35 +00:00
hjk
36b835ff0a Finish merging Runnable and StandardRunnable
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>
2018-05-23 08:48:36 +00:00
Christian Stenger
f129ed9d96 AutoTest: Fix timeout handling
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>
2018-05-18 12:33:44 +00:00
Christian Stenger
a1a78c4c69 AutoTest: Redo running tests
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>
2018-05-18 12:33:37 +00:00
Christian Stenger
2557e685e5 AutoTest: Extract code into function
Part of a later refactoring.

Change-Id: I8321b344ff333195905be68131aab508d1a87aee
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-18 10:29:13 +00:00
Christian Stenger
21974a4bcb AutoTest: Simplify internal function
...and silence a krazy2 warning.

Change-Id: I72efc50baa53f03250813cae646da0f7c07a83f5
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-18 10:28:49 +00:00
Christian Stenger
e5e493c291 AutoTest: Fix construction of results tree
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>
2018-05-15 05:28:49 +00:00
Pawel Rutka
c8f1da095d AutoTest: Add possibility to trigger test run from source
Change-Id: Iceed69747de64d76f34451d41f719c8dbdd81e44
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-16 10:50:21 +00:00
Eike Ziller
205c930592 Merge remote-tracking branch 'origin/4.6'
Change-Id: I63f8aebb201936f671b1486ff9420f67e5e3fafc
2018-03-01 15:46:37 +01:00
Christian Stenger
383d53ddbd AutoTest: Fix debugging tests
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>
2018-02-28 13:48:26 +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
David Schulz
8accfddb17 AutoTest: Delegate reporting crashes to output reader
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>
2018-01-16 11:47:06 +00:00
Oswald Buddenhagen
777ca8e655 Merge remote-tracking branch 'origin/4.5'
Conflicts:
	src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
	src/plugins/qmlprofiler/qmlprofilertraceclient.cpp

Change-Id: I94647f59d7a9df48168ac066555afe80f5f9b91f
2017-12-21 13:20:24 +01:00
Christian Stenger
c98131d8e7 AutoTest: Fix setting test executable for output reader
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>
2017-12-14 12:26:58 +00:00
Christian Stenger
5b64c6ea82 AutoTest: Remove confusing information
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>
2017-11-20 14:45:00 +00:00
Christian Stenger
938b3423a9 AutoTest: Ask for run configuration only if needed
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>
2017-11-09 11:24:04 +00:00
Christian Stenger
3eb8c88974 AutoTest: Improve process error handling
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>
2017-10-04 12:29:01 +00:00
Christian Stenger
cff8dac2b8 AutoTest: Improve handling of canceled test configurations
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>
2017-10-04 11:45:36 +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
1e8d030284 AutoTest: Ask for runnable if determination failed
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>
2017-09-26 07:33:32 +00:00
Eike Ziller
3d9cf954e2 Merge remote-tracking branch 'origin/4.4'
Conflicts:
	src/plugins/debugger/debuggerdialogs.cpp
	src/plugins/debugger/gdb/remotegdbserveradapter.cpp

Change-Id: I1ae77869887a8d9ef2a33439f2733315db9e0cf0
2017-09-19 12:10:26 +02:00
Christian Stenger
4068ec44b6 AutoTest: Allow arguments for test runs
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>
2017-09-18 12:17:04 +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
hjk
7eec0f63ac Debugger: Merge DebuggerStartParameter into *RunParameters
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>
2017-09-13 14:00:59 +00:00
Claus Steuer
d85e9bbe2f AutoTest: Fix test result output when debugging tests
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>
2017-09-12 05:37:12 +00:00
Ulf Hermann
47886969cc Drop unused variables and lambda captures
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>
2017-09-08 09:06:53 +00:00
hjk
503a73d527 AutoTest: Use new setter based DebuggerRunTool interface
Change-Id: I559bef1b088af9009247542730208d18b514b118
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-08-25 05:50:16 +00:00
hjk
0a2032e434 ProjectExplorer: Rename RunControl::finished to stopped
That's what it is.

Change-Id: I8cf9af23bb7cafe1cde8f165fdbf85cdeb79f7e4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-12 10:06:34 +00:00
hjk
6f0a600bcf Debugger: Streamline error string handling
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>
2017-07-11 10:53:00 +00:00
hjk
629c137ef2 ProjectExplorer: Remove virtual RunControl start/stop trampolin
Not needed anymore, effectively replaced by RunWorker start/stop.

Change-Id: I7483c841cdd4e05c9e1f7636a27b20ece37947c2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-30 13:32:34 +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
Robert Loehning
dabab693e9 AutoTest: Move creation of DebuggerRunTool to safe place
Change-Id: I11aeba477b741717fa65b816ee3fad3f00b9b1d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-29 06:01:40 +00:00
hjk
6e990f96c6 Debugger: Remove DebuggerRunControl
Use plain RunControl + DebuggerRunTool combo instead.

Change-Id: Ib71b5eab50da667b9d71dcc6689d2643ad8ecdee
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-28 12:42:29 +00:00
hjk
c2ebce6849 Debugger: Reduce explicit DebuggerRunControl use
Aim is to replace it with its ProjectExplorer::RunControl base.

Change-Id: I30f837050e7c016887dc4b6cfef10b947f4f88ed
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-27 07:43:30 +00:00
Eike Ziller
88897f3a87 Merge remote-tracking branch 'origin/4.3'
Conflicts:
	src/plugins/genericprojectmanager/genericproject.cpp
	src/plugins/genericprojectmanager/genericproject.h
	src/plugins/genericprojectmanager/genericprojectnodes.cpp
	src/plugins/genericprojectmanager/genericprojectnodes.h

Change-Id: Ie0c870f68c8d200a75489b75860987655b2f6175
2017-04-19 09:56:14 +02:00
hjk
5d97c4871a ProjectExplorer: Remove startRunControl()'s runMode parameter
It is redundant, as a RunControl has a runMode() getter.

Change-Id: Ia048b271a5003356d21f86a3f778827d23466037
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-04-12 12:11:49 +00:00
Christian Stenger
f173dc82df AutoTest: Provide more details on failure or guess
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>
2017-04-12 11:57:36 +00:00
Christian Stenger
1024d25e93 Debugger: Remove output processor from RunControl
The same functionality is available by using signals of the RunControl.
This reverts ca3bcd81 partially.

Change-Id: Id1d4d6e8326be60cdbe7c862dab46f49dbc6abe7
Reviewed-by: hjk <hjk@qt.io>
2017-04-06 13:53:57 +00:00
Christian Stenger
4fbca421bd AutoTest: Fix senseless error message
Change-Id: Ie88b5f6c0d1fe933cd43dfde2f04c76590552a58
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-03-29 12:31:31 +00:00
Christian Stenger
0a3efc042d AutoTest: Fix warning for guessed configs
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>
2017-03-28 05:07:04 +00:00
Christian Stenger
8a071a57bd AutoTest: Make some strings translatable
Change-Id: I9cbb3051d5b3d63116c086cbdcdb97992202298e
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-03-14 08:24:21 +00:00
Christian Stenger
74fb4bb014 AutoTest: Use better names and remove unused code
Change-Id: Ifb7f252e7c3fd020537eb46c62d8f5700b8a55ef
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-24 09:36:28 +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
b171f3dfbc AutoTest: Ensure that testrunner can always return to not running state
Task-number: QTCREATORBUG-17226
Change-Id: I3ebba229ad8df4d59b550f7be3305bb8f14fb8b2
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-04 13:57:05 +00:00
Christian Stenger
18dc7a5de9 AutoTest: Move framework settings into framework manager
Change-Id: I9914291adb102de5136802eb3b6d12afb6276538
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-10 06:34:28 +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
053f5bf3d3 AutoTest: Show results for debugging tests as well
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>
2016-09-05 12:40:59 +00:00
Robert Loehning
b03c92a6ff AutoTest: Remove stray white space
Change-Id: Ic50dfc5549974641df08666152ed1a3b70d9b580
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-09-05 05:32:50 +00:00