MCPcopy Create free account
hub / github.com/KDE/kdevelop / processFinished

Method processFinished

plugins/cmake/testing/ctestrunjob.cpp:152–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void CTestRunJob::processFinished(KJob* job)
153{
154 int error = job->error();
155 auto finished = [this,error]() {
156 TestResult result;
157 result.testCaseResults = m_caseResults;
158 if (error == OutputJob::FailedShownError) {
159 result.suiteResult = TestResult::Failed;
160 } else if (error == KJob::NoError) {
161 result.suiteResult = TestResult::Passed;
162 } else {
163 result.suiteResult = TestResult::Error;
164 }
165
166 // in case the job was killed, mark this job as killed as well
167 if (error == KJob::KilledJobError) {
168 setError(KJob::KilledJobError);
169 setErrorText(QStringLiteral("Child job was killed."));
170 }
171
172 qCDebug(CMAKE_TESTING) << result.suiteResult << result.testCaseResults;
173 ICore::self()->testController()->notifyTestRunFinished(m_suite, result);
174 emitResult();
175 };
176
177 if (m_outputModel)
178 {
179 connect(m_outputModel, &OutputModel::allDone, this, finished, Qt::QueuedConnection);
180 m_outputModel->ensureAllDone();
181 }
182 else
183 {
184 finished();
185 }
186}
187
188void CTestRunJob::rowsInserted(const QModelIndex &parent, int startRow, int endRow)
189{

Callers

nothing calls this directly

Calls 4

notifyTestRunFinishedMethod · 0.80
testControllerMethod · 0.80
ensureAllDoneMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected