From 72ecbb7255aca136cb7f0ebf8322be2f9f74b18a Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Fri, 11 Jul 2014 15:52:47 +0200 Subject: [PATCH] PluginManager: Skip test run in case of plugin errors ...otherwise it might happen that no test functions will be executed, which is highly confusing, especially since no error dialog will be shown. If there are errors, just print a warning and quit. If we do not quit, the error dialog will be shown which might block build machines. Change-Id: Ic347dfba8fefc0e0f375cf2363265008df56ee53 Reviewed-by: Daniel Teske --- src/libs/extensionsystem/pluginmanager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libs/extensionsystem/pluginmanager.cpp b/src/libs/extensionsystem/pluginmanager.cpp index ffe5e2b3f70..ed83cbcdf77 100644 --- a/src/libs/extensionsystem/pluginmanager.cpp +++ b/src/libs/extensionsystem/pluginmanager.cpp @@ -691,6 +691,13 @@ void PluginManager::formatPluginVersions(QTextStream &str) void PluginManager::startTests() { + if (PluginManager::hasError()) { + qWarning("Errors occurred while loading plugins, skipping test run. " + "For details, start without \"-test\" option."); + QTimer::singleShot(1, QCoreApplication::instance(), SLOT(quit())); + return; + } + #ifdef WITH_TESTS foreach (const PluginManagerPrivate::TestSpec &testSpec, d->testSpecs) { const PluginSpec * const pluginSpec = testSpec.pluginSpec;