Commit Graph

26 Commits

Author SHA1 Message Date
hjk
164ae1428e ProjectExplorer: Move RunControl related classes to separate file pair
Change-Id: I5da56f80336673d595907abcc797f628be680cd5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-13 14:44:46 +00:00
Christian Stenger
f350c4d1d4 AutoTest: Replace some scary wording
Change-Id: If8c45824c80ed6dd2da5874af56e61ab7abb3305
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-09-21 07:40:17 +00:00
Christian Stenger
d058dcc326 AutoTest: Filter out interfering environment variables
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>
2018-09-04 06:06:33 +00:00
Christian Stenger
1d894c0f7a AutoTest: Code cosmetics
* use nullptr
* override
* remove old style casts
* fix most of the code model warnings

Change-Id: Ia08e846f9326ae28ca7e7d66748e25a8b817b9b1
Reviewed-by: Xing Xiong
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-07-20 08:34:48 +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
6a470f0a70 AutoTest: Do not overwrite already found build system targets
Especially when using CMake based projects in combination with GTest
we might have lots of build targets defined inside the same
'project file'. Overwriting the already assigned content is purely
wrong. Instead handle each found build system target on its own.

Task-number: QTCREATORBUG-17882
Task-number: QTCREATORBUG-18932
Change-Id: I3297a9e1da8ae4186fd4267e3485368b1a059314
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-19 08:25:47 +00:00
Christian Stenger
faee18d31e AutoTest: Enable debugging for Quick Tests
Task-number: QTCREATORBUG-18961
Change-Id: I6f00c84ea6279ceb59745e5bb12349511ae4637b
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-09 12:46:33 +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
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
Christian Stenger
1acf748f5f AutoTest: Use StandardRunnable inside TestConfiguration
Replace some members by a single one.
By using the StandardRunnable we automatically get more
information that can be used later (arguments, device).

Change-Id: Id2afb6dffc27d97da568372f6ee13c7181fc393a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-12 09:17:48 +00:00
Claus Steuer
4e4118dd26 AutoTest: Add location info to all GTest results
Currently location information are only set for failed gtest results.
One can't jump to the location of a successful test by doing a double
click on the corresponding entry in the test result pane.

Use the TestTreeModel to obtain the location information for successful
tests in the GTestOutputReader.

Change-Id: I3fad2d0540edb653ff186011cb92db220748b4f5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-01 05:02:38 +00:00
Christian Stenger
cce1e130d7 AutoTest: Fix handling of multiple build targets
If project files are not mapped 1:1 to targets the result
of the chosen executable was more or less random.
Try to handle multiple targets as correct as possible by
checking for build targets already where we still know
which files are part of the respective test cases.

Task-number: QTCREATORBUG-17783
Task-number: QTCREATORBUG-18357
Change-Id: I82dcc26bf52c9918e2727b439a719af08879ef49
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-19 08:14:55 +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
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
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
f3cb2ee761 AutoTest: Provide DebuggableTestConfiguration
Preparation for easier distinguishing arguments for performing
normal run versus debug run.

Change-Id: I41cfa7fca5730f721b5b6a980c82c015f9e7f914
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-09-08 05:58:25 +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
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
Christian Stenger
2f8b4b3fbf AutoTest: Move test framework related code...
...into files and respective sub folders.

Change-Id: Ic80d693bd73993a6e74b6d422349e47276e8cb6e
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-01 11:37:32 +00:00
Christian Stenger
be44c8b207 AutoTest: Fix compile on Win
Change-Id: Idd789df837a5b961faafe2753a67c1fb6c20a1d9
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-05-19 14:57:17 +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
hjk
39a38d5679 Wholesale conversion to #pragma once
Kudos to cgmb and https://github.com/cgmb/guardonce

Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 15:20:19 +00:00
Christian Stenger
36f6a5580f AutoTest: Unify handling of test tree items...
...and let specialized items handle its specialization by itself.

Change-Id: I988ce3c610bef68933b9102bb39ae4723add3a99
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-26 09:40:16 +00:00
Christian Stenger
09bc4baf3c AutoTest: Fix source file construction on Windows
Task-number: QTCREATORBUG-15667
Change-Id: I4d0e81a39a5031403d77fb3e2179ed17451346b4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-01-28 07:03:53 +00:00
Christian Stenger
15b4e6fc91 Delete unneeded and prepare directory structure...
...to get plugin's repository more easily integrated
into QC's repository.

Change-Id: I10243bb4283623ae951e799feacaa15915678e04
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-01-22 14:07:19 +00:00