Commit Graph

840 Commits

Author SHA1 Message Date
Christian Stenger
2a375a4f60 AutoTest: Silence coverity warning
Change-Id: I8195e9d17a7dfa90724e062c0974e98b74ae2548
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-31 07:41:02 +00:00
Alessandro Portale
4398c3498d Autotest: Remove 1-pixel frame around the test result pane
Change-Id: I0826aa4ecc0c5ecc4c03fe895e3ad09456c5f423
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-28 07:14:07 +00:00
Christian Stenger
5525f2b112 AutoTest: Use Utils::FilePath for files and directories
Still some missing bits as some QString members had different meanings
depending on their context.

Change-Id: Ib48eab54498974a26bbd5123cbffeefee5f7e79c
Reviewed-by: hjk <hjk@qt.io>
2021-05-27 12:24:05 +00:00
David Schulz
919bbe8408 Core: Use Utils::Link for openEditorAt
Change-Id: I246e06b11b4f32f46d7f3ec93df81bcc676aebbe
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-25 17:32:59 +00:00
David Schulz
356bfcc9fd Utils: filepathify Link
Change-Id: Ie62500bde139158e776f9698ee0ea00c2a113f93
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-25 17:32:18 +00:00
Eike Ziller
dbd4a10d6f Merge remote-tracking branch 'origin/4.15'
Change-Id: I3d3dfa04124eed14952294c2847b9851dcb1a5fd
2021-05-25 16:26:54 +02:00
Christian Stenger
4956be9935 AutoTest: Take failed to run ctests into account as well
Otherwise the result will not be displayed and may lead to
wrong test results with a contrary correct summary.

Change-Id: Id041dbac441eea8a1a1d623acd87e049bca9a281
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-25 12:27:28 +00:00
Christian Stenger
ad16790140 AutoTest: Do not ignore crashing tests
If a test crashes we need to take its output into account
to avoid not displaying a result for the respective test
and having a wrong visual view of the results.

Change-Id: I349153192fa06c5d61bc51f8274d32ceb8cf8731
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-21 06:04:17 +00:00
David Schulz
a13aef759e Utils: filepathify fileutils
Change-Id: Ic9048369f64d793f5f567cdb0c715488fb5a4ff6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-18 14:30:53 +00:00
David Schulz
8b7a90ac51 Utils: filepathify TextFileFormat
Change-Id: I6a4e2d38b0bbdec661a4a492901d9182a9f2e502
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-18 12:35:49 +00:00
hjk
11f574fef9 Core: Unify INavigationWidget creation a bit
Move toolbutton creation/listing closer to the widget.

Change-Id: I0e1342ede40fada1c5c9fb0b11d77852b78cc053
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-18 08:35:28 +00:00
Eike Ziller
3823b0af5f Merge remote-tracking branch 'origin/4.15'
Conflicts:
	src/libs/languageserverprotocol/workspace.cpp
	src/libs/languageserverprotocol/workspace.h

Change-Id: I739ae6642b1e2a505e351903f19df2550ef01629
2021-05-12 15:27:30 +02:00
Christian Stenger
0cef9a8554 AutoTest: Fix crash in gtest support
If the parser processes a test with an empty test name
it crashed QC.

Change-Id: Ic377f609ecdd74724ee7a272be3d5b60f0101afa
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-12 13:11:28 +00:00
hjk
f2f40efa03 Utils: Move process arguments class out of QtcProcess
The main QtcProcess interface is nowadays a CommandLine, with no
explicit references left to QtcProcess::Arguments and related static
helper functions, so it only clutters the QtcProcess class interface

So move these items out of QtcProcess, later potentially to a separate
file pair.

Change-Id: I45c300b656f5b30e2e2717232c855fdd97c2d1d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-11 09:45:24 +00:00
Eike Ziller
6bb918adab Merge remote-tracking branch 'origin/4.15'
Change-Id: Ic839ab43a723ab22cc83e5b0d823ec6121cb6701
2021-05-10 13:50:58 +02:00
Christian Stenger
c1abbf0802 AutoTest: Fix checkstate evaluation
When the last item of a test got modified and gets a
different state than the rest of its siblings we failed
to set the resulting state of its parent to partially
checked.

Fixes: QTCREATORBUG-25702
Change-Id: I122b77b907dfa7fd14c31d8363b025254e0c115e
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-10 07:48:21 +00:00
Christian Stenger
d7c659fa87 AutoTest: Support upcoming Catch2 v3
Fixes: QTCREATORBUG-25582
Change-Id: I6ba7184d63aa6dd2b5b86d2d7d420297b59bef15
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-07 05:02:46 +00:00
Christian Stenger
80f61a5db9 AutoTest: Extract data gathering and parse result creation
Function processDocument() became to huge. Beside this it
might be needed to re-use functionality partially.

Change-Id: I4c31caa4458c165938c3d6f1170d8ac4806d2af1
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-06 07:19:42 +00:00
Eike Ziller
2fe1e881ac Merge remote-tracking branch 'origin/4.15'
Change-Id: I44dad4bbe9ed955d35c713485720a3f36a21874d
2021-04-26 11:59:13 +02:00
Christian Stenger
1effc86642 AutoTest: Fix crash on closing a project
If the check state of a tree item changes due to closing
the project and there is no other project open we access
a nullptr.

Change-Id: Ib08031e19eaae0837d1dc0485a05756cd8d0c0dc
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-04-26 06:22:42 +00:00
hjk
2a1742b289 AutoTest: Use LayoutBuilder for GTestSettingsPage
Change-Id: I7449732a77e1cb2635df3bb45c7ebb24955209d2
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-19 09:45:26 +00:00
hjk
38b4536090 Utils: Introduce a BaseAspect::setEnabler(BoolAspect *)
A convenience method to tie the enabled state of an aspect to some
other bool aspect, to be used e.g. when settings item availability
depends on some check box.

Makes it harder to miss one of the three necessary steps.

Change-Id: I8c120bb6846aea2a503614f7c73fa57a149cab41
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-13 09:59:58 +00:00
Bernhard Beschow
ac61bfdc90 AutoTest: Free TestTreeItem from CppTools dependency
Makes TestTreeItem programming language agnostic.

By moving the "query" methods to CppTools, the cohesion within these
methods is improved, i.e. information crosses the AutoTest <-> CppTools
border fewer times. Furthermore, it allows the CppTools plugin to see
how its data is being used, allowing it to optimize its queries
behind the scenes.

Change-Id: I0a60140abaca1193d500605dfa2812b4d937d94c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-12 06:42:49 +00:00
Eike Ziller
2800f3b51f Merge remote-tracking branch 'origin/4.15'
Change-Id: I0afcf51d354ffd73a8f2956a7f78b1e4f032677b
2021-04-09 12:42:03 +02:00
Christian Stenger
5d5ff57495 AutoTest: Fix gtest detection
If a test name starts with a number the codemodel handles
the function-like macro differently and does not generate
the arguments as it would do when using normal literals.
Work around by explicitly handling the expression tokens.

Fixes: QTCREATORBUG-25498
Change-Id: Ibf381af912403cb7b87c1c30b5a8fc7043c16056
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-04-07 08:58:14 +00:00
Eike Ziller
c0cfafdd3d Merge remote-tracking branch 'origin/4.15'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp

Change-Id: I403b236c40d73a61ae22304e289e9d4374366395
2021-04-06 15:17:40 +02:00
hjk
b63b84b83c AutoTest: Aspectify BoostTest settings page
Change-Id: I68e10a283fcd59f58c77301ef176b4347f68264a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-06 09:51:56 +00:00
hjk
cbc26f5dce AutoTest: Aspectify CatchTest settingspage
Change-Id: I281891fecdcd97e4ec450a795d51981cfb47ef69
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-03-31 12:10:45 +00:00
hjk
1d04466628 Autotest: Use LayoutBuilder for QtTestSettingsPage
Change-Id: I6f454bedbe0f1d2b9a1a14c146e35bcf41752533
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-03-31 11:56:36 +00:00
hjk
a202301918 Autotest: Partially aspectify autotest settings
This only handles the storage side, all gui/layouting is left for
follow-up changes.

Change-Id: I0f2b6dc82e5d4374528c8a72610a5afe264a72b1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-03-31 07:29:24 +00:00
Robert Löhning
cd0a140bde Improve translatable strings
Change-Id: I0104209bb0f865a48f9ca2524f62457f7524bba9
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-03-25 16:53:40 +00:00
Leena Miettinen
131c7e869f Autotest: Fix capitalization in UI text
Change-Id: Ib25f3322bd7014489ab9aa18d9cfa0f1544ea8f6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-03-18 10:22:19 +00:00
Christian Stenger
1133e26d3a AutoTest: Do not mix up sanitizer results and normal results
If a test framework uses stderr for output we might end up adding
real test output to a not-yet-sent sanitizer result.

Fixes: QTCREATORBUG-24328
Change-Id: I389c09da626229aa8985b2f99671b6ba8b6c467c
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-02-18 08:25:03 +00:00
Alessandro Portale
72d91dc94a Use qAsConst with non-const Qt containers in range-loops
... in various places

Change-Id: Ic6c0c1b9437a1ed402105c7a14a1f5f9454a68d4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-02-17 14:43:29 +00:00
Christian Stenger
60f1e23ff2 AutoTest: Enable ubsan handling as well
Task-number: QTCREATORBUG-24328
Change-Id: Ibe1e3d55963139ff50f1ebc4a861d1be17f83322
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2021-02-17 08:52:16 +00:00
Bernhard Beschow
06dd646370 AutoTest: Only expose ITestTreeItem in TestTreeModel's public methods
Change-Id: Ide2513c838178b841763fe781478748a852a258c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-12 16:44:16 +00:00
Bernhard Beschow
cba4d5de5c AutoTest: Mark method as static
Change-Id: I14f2f0acf266a0fb4f88e26f50cfbe2257e3ab9a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-12 16:43:54 +00:00
Bernhard Beschow
2d92ae391a AutoTest: Prefer ITestBase::type() to ITestBase::asTest*()
The casting provided by the asTest*() methods isn't made use of here, so
using the "data-oriented" type() method seems more expressive.

Change-Id: Ia3e1a28d126f096afed54eeb0d884c52332f4350
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-09 22:38:20 +00:00
Bernhard Beschow
c16f8ce988 AutoTest: Prefer ITestParser to ITestFramework in TestCodeParser
Preserves the level of abstraction.

Change-Id: I01354fc8fcdf846dd2ef2a20fce12f6e9c4756b2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-08 09:36:35 +00:00
Bernhard Beschow
0e0c2ca91c AutoTest: Improve type safety in TestTreeItem
Ensures that the static_cast<>() in framework() always succeeds.

Change-Id: I6aff0cf12a565bd6f9791c67979698729d7143e5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-04 11:32:45 +00:00
Bernhard Beschow
ed6083b521 AutoTest: Improve type safety in TestParseResult
By having TestParseResults take ITestFramework rather than ITestBase as
parameter, some base->asFramework() casts can be avoided today which
could possibly fail in the future.

Moreover, it allows TestTreeItem to take ITestFramework rather than
ITestBase as parameter which improves type safety further. This shall be
done in a separate commit though.

Change-Id: I66594415d68c3423076a0830ecd11080d3b6c186
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-04 11:31:56 +00:00
Bernhard Beschow
3d075d30d0 AutoTest: Fix invalid static_cast
Test tools only create ITestTreeItems, not TestTreeItems.

Change-Id: Idb20844b80e351d4f0a472e4b97b074797ad6f99
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-04 11:31:09 +00:00
Bernhard Beschow
5d7f2d7444 AutoTest: Use working copy of own parser
In TestCodeParser::syncTestFrameworks(), a parser is created for every
test framework. As a result, the last parser being created would "win"
the global s_parserInstance variable, which is not predictable and
probably not intended. So turn CppParser::getFileContent() into a non-
static method, avoiding the global variable altogether.

Change-Id: I9f7560f1185bc4a3bc7b2b36e89280351998465e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-22 10:51:53 +00:00
Christian Stenger
da07d8f5c3 AutoTest: Fix some clazy warnings
Avoids potential nullptr accesses and unneeded allocations.

Change-Id: I8c13ca1dab885fc3e9a05dc7329ff592a7f0fe1a
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-19 12:27:08 +00:00
Christian Stenger
86557203b3 AutoTest: Handle summary of Qt tests if possible
When using plain text output of Qt and Quick tests we are able
to correct possible mis-parsings of the output.
These merely can happen if the test application produces output
on stdout on its own which may interfere with the normal test
output and confuses the parser.
If XML output is used this handling is impossible as we do not
get any summary, but interfering the output with user stuff
would end up in a parse error and a fatal anyhow.

Task-number: QTCREATORBUG-25112
Change-Id: I84f5e542aa3faeb6470963c784e92ed1b2584b61
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-18 06:07:43 +00:00
Christian Stenger
ab963bd4f1 AutoTest: Simplify expression
Change-Id: I3f724e3d9f749f533cd6d18e2258cf7e99c29239
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-15 06:20:18 +00:00
Christian Stenger
3de4ac3736 AutoTest: Handle test tools inside project settings
This effectively enables to handle ctest project wise instead
of just globally. So far only code based test frameworks could
be enabled or disabled by project.

Change-Id: I491f91119c3500131ca51af4d55b0e68d47debf0
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-15 06:20:09 +00:00
Christian Stenger
b4cc084a98 Utils: Add findAnyChild() to TypedTreeItem
Removes some static casts on the user side.

Change-Id: I0a9ae512f294c0e78e0a5890e557c483af86abfe
Reviewed-by: hjk <hjk@qt.io>
2021-01-08 05:58:54 +00:00
Bernhard Beschow
f82692cc7f AutoTest: Make code more symmetric
... by assuming that active.keys() is a subset of
TestFrameworkManager::registeredFrameworks() which is used in the case
above. Also, TestFrameworkManager::registeredFrameworks() is already
sorted, as can be seen from the above case, too.

Change-Id: If82c8c998716fa56d6257d3ee0ec09c12d458bb1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-07 14:54:34 +00:00
Christian Stenger
a59e04b848 AutoTest: Provide basic ctest integration
This allows to have ctest based tests listed inside the test
integration and to run them.

Task-number: QTCREATORBUG-23332
Change-Id: I1cb855697d7bb4afcd7c887506abdea16c252cb0
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-07 08:25:03 +00:00