summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@nokia.com>2012-02-17 09:37:15 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-22 07:25:49 +0100
commit949b7452e0d2402a3ba046a5ba1fe043b670baaa (patch)
tree83ae09f60e0b13a302ee87d75dbc28eedebdcd3f
parente9015b3bc8827a8276f58bdd41adcac1bcbf2137 (diff)
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>
-rw-r--r--src/testlib/qtestcase.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 0b5f636644..e867b9629a 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -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());