aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-05-04 14:57:03 +0200
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-05-05 11:42:45 +0300
commit59e01e2a89290c0aa4a50d7064bbaade511cc8c3 (patch)
tree7da010396679788ef8eedb6354d443e8e5f12c3f /plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp
parent5a493ae38fa74b27b0f7bfb1f7c7a00bd299b9cf (diff)
Unit tests: Explicitly check for success from runner.csa-v3.4.2csa-v3.4.1csa-3.4
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>
Diffstat (limited to 'plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp')
-rw-r--r--plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp b/plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp
index 4e98a28ddd..ce5fc9b3d3 100644
--- a/plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp
+++ b/plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp
@@ -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)