ClangToolRunner: Move finishAllAndDone one level up

When the onSetup() handler returns StopWithError,
the group stops immediately with an error, regardless of
its workflow policy.

Our intention is to report an error only if the initial
onSetup() handler returned StopWithError. Otherwise,
regardless on how the subgroup execution went, we want to
report success to the parent. That's why the
finishAllAndDone is an appropriate policy for the top group.

In case the ProcessTask fails, we don't want to continue
executing AsyncTask, that's why the finishAllAndDone got
removed from the subgroup, leaving it with the default
workflow policy of stopOnError.

Change-Id: I86ac18f062cd431e5138f87cdb01ef59e3d77d7e
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Jarek Kobus
2023-06-22 16:18:37 +02:00
parent 1532986f10
commit c510689fe4

View File

@@ -218,11 +218,11 @@ GroupItem clangToolTask(const AnalyzeInputData &input,
};
const Group group {
finishAllAndDone,
Storage(storage),
onGroupSetup(onSetup),
Group {
sequential,
finishAllAndDone,
ProcessTask(onProcessSetup, onProcessDone, onProcessError),
AsyncTask<expected_str<Diagnostics>>(onReadSetup, onReadDone, onReadError)
}