PluginManager: add -test all capability for internal testing.

This commit is contained in:
Bill King
2011-02-16 13:40:44 +01:00
parent 884a62228f
commit 8ef42cce44

View File

@@ -107,6 +107,12 @@ bool OptionsParser::checkForTestOption()
if (m_currentArg != QLatin1String(TEST_OPTION)) if (m_currentArg != QLatin1String(TEST_OPTION))
return false; return false;
if (nextToken(RequiredToken)) { if (nextToken(RequiredToken)) {
if(m_currentArg == "all") {
foreach(PluginSpec *spec, m_pmPrivate->pluginSpecs) {
if (spec)
m_pmPrivate->testSpecs.append(spec);
}
} else {
PluginSpec *spec = m_pmPrivate->pluginByName(m_currentArg); PluginSpec *spec = m_pmPrivate->pluginByName(m_currentArg);
if (!spec) { if (!spec) {
if (m_errorString) if (m_errorString)
@@ -117,6 +123,7 @@ bool OptionsParser::checkForTestOption()
m_pmPrivate->testSpecs.append(spec); m_pmPrivate->testSpecs.append(spec);
} }
} }
}
return true; return true;
} }