Commit Graph

180 Commits

Author SHA1 Message Date
Jarek Kobus
05434b71e2 AutoTest: Reindent properly runTestsHelper() [part 1]
Otherwise the parent diff looks giant.

Change-Id: I998f08d271bf231ad33154aeab5b349b1c1e83ad
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-16 10:04:28 +00:00
Jarek Kobus
f44112ed22 AutoTest: Use LoopRepeat for test runner
Change-Id: I2b7eb32732aa1f12b23a719d0c4cce14dd0d7114
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-16 09:36:47 +00:00
hjk
3e3cf3f8a4 AutoTest: Hide plugin class definition in the .cpp
It's not meant to be accessed from the outside.

Change-Id: I0652ec8309e678a9b28e05acab6d0f77a0b13639
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-12 08:41:43 +00:00
Jarek Kobus
ce80a6dad5 TaskTree: Rename TreeStorage<> -> Storage<>
This addresses the 20th point in the master task below.

Task-number: QTCREATORBUG-28741
Change-Id: I696beda87430fbe637abba8054012fb77516e220
Reviewed-by: hjk <hjk@qt.io>
2023-11-20 08:25:50 +00:00
Jarek Kobus
ced3052e7f TaskTree: Get rid of Storage subclass of GroupItem
Make the c'tor of the GroupItem taking the TreeStorageBase
public instead.

This addresses the 20th point in the master task below.

Task-number: QTCREATORBUG-28741
Change-Id: I78320ec24b4e4b915ab549135fb93b45c658b9f2
Reviewed-by: hjk <hjk@qt.io>
2023-11-20 07:47:54 +00:00
Jarek Kobus
4c38f68d0f TaskTree: Rename StopWithDone -> StopWithSuccess
Make naming consistent with recent changes.
"Done" is meant to be an event name when the task / group
finishes. "Done" may finish with "Success" or an "Error".

This addresses the 26th point in the task below.

Task-number: QTCREATORBUG-28741
Change-Id: I53ed6905b1c385c398f49e122e8ca60aa3ad0806
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:09:23 +00:00
Jarek Kobus
2c0a59384c TaskTree: Rename workflow policies
Make naming consistent with recent changes.
"Done" is meant to be an event name when the task / group
finishes. "Done" may finish with "Success" or an "Error".

This addresses the 26th point in the master task below.

Task-number: QTCREATORBUG-28741
Change-Id: Icc882710dc4896626dc9332440aa13a692af54c4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 14:09:15 +00:00
Jarek Kobus
fbe359308d TaskTree: Unify done / errorOccurred signals
Get rid of TaskTree::errorOccurred signal. Provide additional
DoneResult arg for done signal.

Task-number: QTCREATORBUG-29834
Change-Id: I31a3a0701a14246b01f65303a1295f014c855ecf
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 14:07:52 +00:00
Jarek Kobus
b5f77f6d55 TaskTree: Get rid of unneeded done handlers' arguments
Task-number: QTCREATORBUG-29834
Change-Id: I236dec27a292a1b006b7001d01ce620960380de9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-07 11:51:50 +00:00
Jarek Kobus
0fa16f8489 TaskTree: Use common done handler
Instead of specifying two separate done and error handlers,
specify just one that takes additional "bool success" argument.

Task-number: QTCREATORBUG-29834
Change-Id: Ie4f92236a38b03dac3dd33b2c80a317b62772a12
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-06 14:33:27 +00:00
hjk
dc6b40a5c0 Use Utils::Storage instead of QVariantMap in a few places
Change-Id: I02833cf2bc3caaadc22ff93ae530e4aebe4c3868
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-23 14:30:50 +00:00
Jarek Kobus
121d73b30f Utils: Rename ProjectExplorer::Runnable into Utils::ProcessRunData
Move it into Utils lib.

Change-Id: I3b6c16d18439cabddf59afc03116f13c1970102c
Reviewed-by: hjk <hjk@qt.io>
2023-08-17 07:44:34 +00:00
hjk
2a07253a42 Debugger: Rename debuggerkitinformation.{cpp,h}
... to debuggerkitaspect.{cpp,h}

Change-Id: Ia6316fcdc893ca066933658a52c78ef1587a76e8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-16 07:33:43 +00:00
hjk
694d81ad63 Autotest: Adapt to changed settings access pattern again
Settings are created on first access now, even though this
doesn't matter much here as this happens unconditionally in
AutotestPluginPrivate ctor via m_frameworkManager.synchronizeSettings()

Change-Id: I340927cf107d7e4b2268e842d23f1a89898e8a92
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-10 08:13:37 +00:00
Jarek Kobus
c1f6d70445 RunControl: Remove initiateFinish() / finished()
The only difference between initiateFinish() and initiateStop()
is that the initiateFinish() deletes the RunControl automatically
after the final state was reached.

Add setAutoDeleteOnStop() property and reuse initiateStop()
and stopped() instead.

Change-Id: I8e842978831b19587a8658b4443c96a04eb7a6df
Reviewed-by: hjk <hjk@qt.io>
2023-07-04 07:29:23 +00:00
Jarek Kobus
664d409489 TaskTree: Rename TaskAction into SetupResult
It's only used as a return value from group's or task's
setup handler. It instructs the running task tree on
how to proceed further.

It addresses the 21th point in the bugreport below.

Task-number: QTCREATORBUG-28741
Change-Id: I25802c76b9e7bc044c6a38197935798d2da9ad02
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-06-21 10:24:10 +00:00
Christian Stenger
b6961c38b6 AutoTest: Fix special handling for boost exit
...especially for the case where the test output is suppressed.

Change-Id: I7294af9e941d800b8aae65f7c2c6f898f2ac4e46
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-06-20 11:40:53 +00:00
Alessandro Portale
50c386b53a Translations: Call Tr::tr() where it should
Change-Id: Ibf2be8a9aabd0a4e8e763a96901feaaa6eda2f3e
Reviewed-by: hjk <hjk@qt.io>
2023-06-09 12:04:26 +00:00
Jarek Kobus
d97d3f58ac TaskTree: Rename TaskItem into GroupItem
Not all classes derived from TaskItem are tasks,
but the common denominator is that all may be placed
inside a group: thus GroupItem sounds more appropriate.

Addresses the 10th point in the bugreport below.

Task-number: QTCREATORBUG-28741
Change-Id: I94d728a8e39ec732810f2e5bbe6b9a76f3bc387c
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-06-06 09:06:01 +00:00
Jarek Kobus
4e01ca18d1 TaskTree: Rename optional into finishAllAndDone
Rationale:
1. More descriptive.
2. More consistent with a planned new finishAllAndError policy.
3. Limits the possibilities of making a conflict with std::optional.

Change-Id: I5155630188e4b699e6c18b13a101e0e2d4fe98f2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-30 15:23:31 +00:00
Jarek Kobus
0793b945f3 TaskTree: Replace usages of OnGroup... with onGroup... functions
Change-Id: I06ce6c917ac28b6362ad2cdef42355e5aa28f4eb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 15:29:55 +00:00
Jarek Kobus
ceff14303a TaskTree: Prepare for OnGroup... -> onGroup... renaming
Change-Id: I52b695999b53b80fb8dbb77895080f6c1b86a58f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-19 15:29:35 +00:00
hjk
30af7a9503 AutoTests: Aspectify parts of main settings
Change-Id: I407b5102e1f2a6647f6fdca01a61dfa422c5d3ee
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-12 14:54:24 +00:00
Jarek Kobus
97a66067bb TaskTree: Prepare for de-utils-ization - part 2
Move TaskTree into Tasking namespace.
Move Tasking namespace out of Utils namespace.

Change-Id: Ib4c1d7f54f1808517e54768dfa27209c33517b61
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-12 08:09:19 +00:00
Jarek Kobus
867b10a06b Remove unused includes of QFutureInterface
Change-Id: I70f5e842801b628c7f9ad4d433334ce04d4e648e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 06:50:36 +00:00
Jarek Kobus
a0f6e8dc04 Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}
Follows QtcProcess -> Process rename.

Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 05:52:26 +00:00
Jarek Kobus
470c95c94b Utils: Rename QtcProcess -> Process
Task-number: QTCREATORBUG-29102
Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-04 05:52:16 +00:00
Jarek Kobus
1d69f943aa Tasking::Process: Rename Process into ProcessTask
Rename QtcProcessAdapter into ProcessTaskAdapter.

Task-number: QTCREATORBUG-29102
Change-Id: I1902c7176da75db60d70125f505084a2ea5ba774
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 12:47:24 +00:00
hjk
3e7d93c788 ProjectExplorer: Move some not-fully-session related bits
... out of SessionManager.

The idea is to later move SessionManager into the Core plugin,
which both is sensible conceptually and also prerequisite to
merge the Bookmark plugin into TextEditor plugin.

Currently, only the interface is split, as the load/save
implemetations are non-mechanical to disentangle.

Change-Id: I31631db3094ea192825a2ccaa6add6188662940b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-01 09:26:50 +00:00
Eike Ziller
380f7622de Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/debugger/watchhandler.cpp

Change-Id: If759b6260dfa008738d3a0ce543eb0eead8a8bba
2023-02-27 09:48:12 +01:00
Christian Stenger
ac2d5d761d AutoTest: Fix handling of test results
Broke with d05c5b7d07. The id is
used to identify the application running a test or a global
message like some warnings or the information regarding the
current running test.
Fixes its usage and its display inside the results pane.

In the amended patch the assumption that if the m_id is empty
it corresponds to nullptr TestResultPtr was apparently wrong.
This patch fixes it so that the default c'tor of TestResult
always creates an invalid result, so that it corresponds now
to nullptr TestResultPtr.

Amends d05c5b7d07

Change-Id: I9949aec3fc2b7354de149433b7127933f2d9bf21
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-24 08:38:54 +00:00
Jarek Kobus
4f70aa7052 TestRunner: Reuse TaskTree
Get rid of QFutureInterface argument from
ITestConfiguration::createOutputReader() and from
TestOutputReader c'tor.

The fine-grained progress reporting was broken anyway:

1. The assumption was that testCaseCount was meant to be
   the total number of test functions executed. It didn't
   include the initTestCase() and cleanupTestCase(),
   while those were reported on runtime apparently
   (and exceeding the max progress by 2).
2. In case of tst_qtcprocess, when the whole test was run,
   the testCaseCount reported 41, while the real
   number of functions was 26 (+2 = 28 for init/cleanup).
3. While the max progress was set to testCaseCount initially,
   the corresponding FutureProgress rendered the progress
   always in 0-100 range, what didn't match the reality.

Instead, rely on TaskTree progress, which resolution
is per test as a whole. So, when executing a series
of tests this should scale fine. In addition, the
progress advances fluently according to the expected
run time - with 10 seconds hardcoded.

The original code locations, where progress was bumped,
are left with a TODO comment for any possible future tweaks.
Like in case of result reporting, fine-grained progress
reporting may be implemented by providing additional signal,
so there is no need for QFutureInterface inside
TestOutputReader.

Change-Id: Idc11d55e3a49dac8d1788948b9a82f68199203c6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-03 08:15:58 +00:00
Jarek Kobus
49f3b8efd7 ITestConfiguration: Introduce testExecutable() helper
Reuse it in TestRunner.

Change-Id: I59ffd256a7e84f0d0726261496d73bc4f622d666
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-27 12:37:54 +00:00
Jarek Kobus
51fed728e1 TestOutputReader: Report results directly through a signal
Instead of using future interface. The advantage is that
signal is delivered synchronously now, in contrary to when
future interface was used - it was queued into main event
loop.

Change-Id: Ic3d521c324c56b249515713c39bd09b9a924b6d3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-27 09:52:09 +00:00
Jarek Kobus
d05c5b7d07 AutoTest: Use TestResult as value type
Don't construct it on heap and don't use shared pointer for it.

Change-Id: I51c9da405ed14d24b5f20242b4d049f9e2958f09
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-27 09:51:34 +00:00
Jarek Kobus
7e815270f1 TestRunner: Get rid of unneeded Utils:: prefix
We are using Utils namespace in this file already.

Change-Id: Ib4b36782b3272eb4974d8dada4518b0d4eec2f21
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-01-18 14:01:57 +00:00
Jarek Kobus
39940a7200 TestRunner: Use QList instead of QQueue
There is not a big benefit when using QQueue - QQueue::dequeue()
has its counterpart in QList::takeFirst(). Using list makes
it possible to assign another list into m_selectedTests.
Make use of QList API consistent in this file (use isEmpty(), first()).

Change-Id: I4a320469f5b44c61f8c51196c104a6ca0d0534e3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-18 14:01:32 +00:00
Jarek Kobus
fdebf0343d TestRunner: Merge 2 public methods into one
Merge setSelectedTests() and prepareToRunTests() into runTests().

Change-Id: I908c41483f05eeaec186f362391941a797d66e6a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-18 13:50:37 +00:00
Jarek Kobus
c9f5098c07 AutoTest: Rename outputReader() into createOutputReader()
Make it clear it's a factory method that creates new instances
of objects, not a simple getter.

Change-Id: I0b44506a27a0353bc524831c305f947510f59e98
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-18 13:50:20 +00:00
Jarek Kobus
9438575beb ProjectExplorer: Move settings structures out of Internal namespace
There is a public exported API that returns these structures,
and different plugins use it, so there is not point in keeping
them inside Internal namespace.

Remove some unused includes.

Change-Id: Ia9d3fc83738c38ae37f04ae0f518ec5d972c9d85
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-13 15:06:19 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Jarek Kobus
9e571931d0 AutoTest: Pass context object to lambda connections
Remove some unneeded lambda () brackets.
Glue lambda brackets with parameters brackets.

Change-Id: I414f7dbbaf60b452cb71f77d53d972937f121a47
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-08 09:32:42 +00:00
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 13:47:53 +00:00
hjk
5dcfbe6c52 Autotest: Use more FilePath
Change-Id: I15de1121305f245274d74b4116786f6f07ffa3c2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-23 07:25:16 +00:00
Alessandro Portale
912b016ab0 Utils: Add "Layouting::HorizontalRule" LayoutItem
We have many horizontal separator lines in the UI, which are each time
repetitively created from a QFrame with some flags set. With the .ui
inlining, we will have more of these separators coming.

This change intoduces a Layouting::HorizontalRule LayoutItem and
replaces various existing QFarme separators with it.

Change-Id: I60bad89e2a2b777fbd2f9d0cf872af81e41dcfd7
Reviewed-by: hjk <hjk@qt.io>
2022-08-29 15:30:25 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
hjk
960e99ecb1 Autotest: Convert to Tr::tr
Change-Id: Ifd4b6ace78d02804ec3b3c1d60c5418081cad6c4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-01 12:16:41 +00:00
Jarek Kobus
4a9fe3e709 TestRunner: Don't call blocking waitForStarted()
Handle failed to start case inside done() handler.

Change-Id: Id138f0ef1fc58b6e335e08d8222e99c29c06b942
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-07-04 12:40:16 +00:00
Jarek Kobus
425a0c8835 AutoTest: Connect to done() signal instead of finished()
QtcProcess::done() is also emitted when process failed to start.

Change-Id: I08f6f104014d1c90c0f761de352dada620207d86
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 12:51:42 +00:00
Christian Stenger
b28f907114 AutoTest: Use QtcProcess for test runner
Change-Id: I29b15a08a260aaf8d2c4071d5ea71d49902d8ef6
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-14 13:33:20 +00:00