CodeCoverage: Move installCoverageTool call.
Call it from qtest_qParseArgs() instead of qExec(). This will allow to remove the code coverage calls from quicktest. Both the installation and the saving of code coverage data are now gathered in testlib. Change-Id: If3baedb0cff9d894e6f232b947af7e3158703d9d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This commit is contained in:
parent
e9015b3bc8
commit
949b7452e0
@ -1449,6 +1449,9 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml)
|
||||
}
|
||||
}
|
||||
|
||||
bool installedTestCoverage = installCoverageTool(QTestResult::currentAppname(), QTestResult::currentTestObjectName());
|
||||
QTestLog::setInstalledTestCoverage(installedTestCoverage);
|
||||
|
||||
// If no loggers were created by the long version of the -o command-line
|
||||
// option, create a logger using whatever filename and format were
|
||||
// set using the old-style command-line options.
|
||||
@ -1987,9 +1990,6 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
|
||||
|
||||
qtest_qParseArgs(argc, argv, false);
|
||||
|
||||
bool installedTestCoverage = installCoverageTool(argv[0], metaObject->className());
|
||||
QTestLog::setInstalledTestCoverage(installedTestCoverage);
|
||||
|
||||
#ifdef QTESTLIB_USE_VALGRIND
|
||||
if (QBenchmarkGlobalData::current->mode() == QBenchmarkGlobalData::CallgrindParentProcess) {
|
||||
const QStringList origAppArgs(QCoreApplication::arguments());
|
||||
|
Loading…
x
Reference in New Issue
Block a user