Commit Graph

26 Commits

Author SHA1 Message Date
Christian Stenger
6e798401a0 Fix plugin unit tests when using projects
The ClangTools and the AutoTest plugins use an internal
mechanism to load and configure a project when performing
their integrated unit tests.
Both assumed to have exactly one kit present for these
tests.
Make it possible to have more kits present when starting
with existing settings or if more kits get automatically
generated when starting with clean settings.

Change-Id: If2bc66320c4854f1d34a19d17107e8f0b7d64d39
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-17 04:13:30 +00:00
Eike Ziller
9a149e295b Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/tools/qml2puppet/CMakeLists.txt

Change-Id: Id6243b0f725a68075d789bf35e771113b742645b
2020-03-30 17:27:55 +02:00
Christian Stenger
ca82019cf0 AutoTest: Fix flakyness of plugin test
Relying on the order of tests of the underlying tree
model is bad as we order the model for the user with a
QSortFilterProxyModel.
Using non-unique keys is not wise either.
Ensure the keys are unique to have reliable results.

Change-Id: I556371d018c16e7b03a8ec85d60afc850056a94a
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-03-26 15:09:57 +00:00
hjk
3f68292dbe ProjectExplorer: Introduce ToolChainKitAspect::{c,cxx}ToolChain
Special accessors to the repeatedly used C and C++ cases to denoise
and slim down user code.  Plus some code cosmetics nearby.

Change-Id: Iba4662bd4731d8c4256e658529f39d5c995691ce
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-19 15:59:12 +00:00
Christian Stenger
8cd7a11926 AutoTest: Fix handling of unnamed QuickTests
..now that the parser understands multiple TestCase items
inside a single qml file.
As long a test function is located inside a different TestCase
it is considered as a different one, so treat test functions
even of unnamed test cases correct.

Change-Id: I5cbfe1f63f896317523d51bbf67ea59169481a71
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-08-22 06:50:05 +00:00
Christian Stenger
c020fb6e3e AutoTest: Fix parsing of multiple test cases in single qml file
Quick tests allow definition of more than one TestCase inside a
qml file and even nesting is possible, so support this correctly.

Fixes: QTCREATORBUG-22761
Change-Id: I65fcc7cd6063d976d798c3e900d3299a12e2d73f
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-07-30 10:45:09 +00:00
Christian Stenger
e6ede1d997 AutoTest: Limit condition for test execution to Linux
gcc and clang are handling builtin include paths differently.
On Linux the default should be gcc - which works fine even
if boost is installed in /usr/local.
On macOS clang is default which does have the correct builtin
include paths only for Qbs but we are testing on qmake as well.
So, expect the BOOST_INCLUDE_DIR set on macOS if we want to
have this test executed.

Change-Id: Ib9ad697b59bfad5413ad984c9b969ec8b174ae9a
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-06-25 07:46:50 +00:00
Christian Stenger
b86c05b96a AutoTest: Add unit test for parsing boost tests
To execute them you need - beside the former prerequisites -
either have boost installed installed at system level (UNIX)
or you must specify BOOST_INCLUDE_DIR as environment variable
otherwise the respective test will be skipped.

Change-Id: I6bd8472e554132ab05e58b56e3ccbd5e9dffada9
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-24 06:27:22 +00:00
Christian Kandeler
83dd031960 ProjectExplorer: Rename KitInformation to KitAspect
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>
2019-02-11 11:55:01 +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
Christian Stenger
5708f3aa34 AutoTest: Handle sub-typed TestCases correctly
Furthermore ensure that TestCase is really the Qml type
to avoid handling self-defined types as Quick Tests.

Task-number: QTCREATORBUG-17787
Change-Id: I08a6c70c3c166eefec6f24669cc225f568e51c7a
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-03-14 08:24:08 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +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
2475da1bb5 Replace some more occurrences of QStringList() << pattern
Change-Id: Ic7193ac3a741763479a9ef129ed05cb7ca64f1e9
Reviewed-by: hjk <hjk@qt.io>
2017-02-08 14:27:48 +00:00
Filippo Cucchetto
4b1f8f3609 ProjectExplorer: Added support for registering custom languages
Change-Id: I728a2ed1ef7d9f44d7c2b59d27d6e23444cd3bb5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-23 11:19:11 +00:00
Christian Stenger
f375f197d1 AutoTest: Add test for derived Qt tests
Change-Id: I8c61c08ff9b0653c02d262fb9010940e41e178af
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-01-11 09:02:09 +00:00
Christian Stenger
69a94c2c28 AutoTest: Always parse if plugin is enabled
Remove the 'Always parse' setting and respective special handling.
This simplifies the handling of parsing for tests and removes
strange special handling that was introduced in earlier versions
and led more to confusion on the user side.

Change-Id: Ia4d122ed448244f3cb3876dda9930864afde9c28
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-12-12 10:57:47 +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
Eike Ziller
7e1b4ccebb Merge remote-tracking branch 'origin/4.1'
Change-Id: I041b949aff8bee481a572ba6f7e2ef72b9010923
2016-07-15 14:10:38 +02:00
Christian Stenger
9a3a0fa7ce AutoTest: Fix detection of gtests inside namespaces
Task-number: QTCREATORBUG-16535
Change-Id: I3285d2545e2861607b6e1406ee24f950405c4367
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-07-15 10:17:44 +00:00
Tobias Hunger
cb14fb0d71 Kits: Save several ToolChains per kit
BREAKS BACKWARD COMPATIBILITY OF TOOLCHAIN SETTINGS!

* Convert old ToolChainKitInformation to new version
* Store several toolchains in one kit (one per language)

Change-Id: Ia59a2ad067c57971ec34ce9b2e43758344443755
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:34:06 +00:00
Christian Stenger
5ec1faa64f AutoTest: Provide additional test project...
...to also test combination of Qbs using Google Test.

Change-Id: I4a5d32a32bfaadd0dfaaa4884b58d2ac1a952bd3
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-05-20 19:23:07 +00:00
Christian Stenger
bf6f1232f7 AutoTest: Use settings for test run
Change-Id: I3871d15c34f19ea87d9c6ff99a6b0a83dad16fd1
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-03-14 07:46:59 +00:00
Christian Stenger
a4b747307e AutoTest: Fix flaky unit test
Since parsing and updating the tree model has been changed the
respective tests became flaky.

Change-Id: I82fcde51493bc86e2315018b21e9bacd8e8409a9
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-26 09:40:39 +00:00
Christian Stenger
992f9ed222 AutoTest: Use mark and sweep for parsing
This also removes caching from parser and the respective test info
files are gone now as well.

Change-Id: Ibcea68e446dea532d6addd2f16863738e497bca4
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-01 08:31:52 +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