forked from qt-creator/qt-creator
Unit tests: Explicitly check for success from runner.
We will otherwise miss runner failures for any file that does not contribute to the diagnostics count. Note: The tool can also fail during the building stage, but in this case we will get notified by the signal spy timing out. Change-Id: Ia9aa797d658b1752e3da6e08a652ee55868955ba Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
@@ -228,10 +228,10 @@ void ClangStaticAnalyzerTool::startTool()
|
||||
m_diagnosticModel->clear();
|
||||
setBusyCursor(true);
|
||||
Project *project = SessionManager::startupProject();
|
||||
QTC_ASSERT(project, return);
|
||||
QTC_ASSERT(project, emit finished(false); return);
|
||||
m_diagnosticFilterModel->setProject(project);
|
||||
m_projectInfoBeforeBuild = CppTools::CppModelManager::instance()->projectInfo(project);
|
||||
QTC_ASSERT(m_projectInfoBeforeBuild.isValid(), return);
|
||||
QTC_ASSERT(m_projectInfoBeforeBuild.isValid(), emit finished(false); return);
|
||||
m_running = true;
|
||||
handleStateUpdate();
|
||||
|
||||
@@ -284,7 +284,7 @@ void ClangStaticAnalyzerTool::onEngineFinished()
|
||||
resetCursorAndProjectInfoBeforeBuild();
|
||||
m_running = false;
|
||||
handleStateUpdate();
|
||||
emit finished();
|
||||
emit finished(static_cast<ClangStaticAnalyzerRunControl *>(sender())->success());
|
||||
}
|
||||
|
||||
void ClangStaticAnalyzerTool::setBusyCursor(bool busy)
|
||||
|
||||
Reference in New Issue
Block a user