Commit Graph

106 Commits

Author SHA1 Message Date
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
Christian Stenger
cbd4f80279 AutoTest: Fix setting working directory
If there is no working directory explicitly set inside the run
configuration we end up using the current working directory of
Qt Creator.
We normally get an empty string if not having modified the respective
target ourselves although you can see a default working directory when
opening the respective target for the first time.

Task-number: QTCREATORBUG-16715
Change-Id: I6e16fd4f9b15759793653a6c229c44a1be2b7739
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-08 11:11:13 +00:00
Christian Stenger
16c007a054 AutoTest: Fix stopping test run when debugging tests
Change-Id: I19dcbd89b68e4df5d87cb6b6923adee0d07a6b55
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-07-26 05:59:43 +00:00
Christian Stenger
e70adf820e AutoTest: Allow run/debug without deployment
Task-number: QTCREATORBUG-16486
Change-Id: I7ef5887e065830152744a9bd7d7727058b4521d9
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-07-15 09:17:48 +00:00
Christian Stenger
5988fd0f5c AutoTest: Add minimum support for debugging tests
This adds another context menu entry for items on the test tree
to allow debugging of a single test.

Task-number: QTCREATORBUG-16070
Change-Id: I98f56b0f22c94ad71f0b91d690383043ed27f1c7
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-22 10:51:12 +00:00
David Schulz
537c6fa9a8 AutoTest: Print error message when test couldn't be started
Change-Id: Ibae31902e8a4ece25af8a97f6202269f1eecf597
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-17 12:33:32 +00:00
Christian Stenger
f429b95b0e AutoTest: Separate test configurations
Change-Id: I573b703b4f9ec246cf429d2602b6dc0b8174b50f
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-05-19 12:10:38 +00:00
Takumi ASAKI
8d3e0a1017 AutoTest: tr()-Fixes
Do not use QObject::tr().

Change-Id: If92f36166f29defd3501410efeed8e6f68dc896d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-03 13:28:26 +00:00
Christian Stenger
7c0e76aee4 AutoTest: Inform user when tests did crash
If a test crashes for whatever reason one did not get any information
about this so far.
Add an explicit fatal for such cases.

Change-Id: Ica2aec4b30f38d29acfe170526f4468aa6577887
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-04-18 11:21:00 +00:00
Christian Stenger
104b434c8d AutoTest: Fix processing of output
In case a (Qt) test process produces output that does not belong
to the standard test output we might ended without processable
output at all.
Avoid this by just handling the output that is given on stdout
for now.

Change-Id: If5ee70140b95cb61422e58a7610b7fe2d09915c2
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-04-18 11:01:50 +00:00