Plugin tests: Unlimit number of warnings to output

Change-Id: I7e7894c7e436d7eae62429ebc3f97bba4d6e3205
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Nikolai Kosjar
2013-03-15 11:15:33 +01:00
parent c85c3d15c6
commit 7dee10f49c

View File

@@ -730,14 +730,16 @@ void PluginManager::startTests()
}
}
// QTest::qExec() expects basically QCoreApplication::arguments(),
// so prepend a fake argument for the application name.
testFunctionsToExecute.prepend(QLatin1String("arg0"));
// Don't run QTest::qExec with only one argument, that'd run
// Don't run QTest::qExec without any test functions, that'd run
// *all* slots as tests.
if (testFunctionsToExecute.size() > 1)
QTest::qExec(pluginSpec->plugin(), testFunctionsToExecute);
if (!testFunctionsToExecute.isEmpty()) {
// QTest::qExec() expects basically QCoreApplication::arguments(),
QStringList qExecArguments = QStringList()
<< QLatin1String("arg0") // fake application name
<< QLatin1String("-maxwarnings") << QLatin1String("0"); // unlimit output
qExecArguments << testFunctionsToExecute;
QTest::qExec(pluginSpec->plugin(), qExecArguments);
}
}
if (!d->testSpecs.isEmpty())
QTimer::singleShot(1, QCoreApplication::instance(), SLOT(quit()));