From a6d3983ef6b7affef1d2aa48ed8bf8000a6e4267 Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Thu, 2 Feb 2012 10:12:21 +0100 Subject: CodeCoverage: Handle QTest based subtests. Set QT_TESTCOCOON_ACTIVE environment variable when the coverage is installed for a test and unset it when the coverage data is saved. Tests that run when QT_TESTCOCOON_ACTIVE is set are subtests and will not be considered as stand-alone tests for the coverage. When a test is run as a subtest its coverage data will not be saved for itself but for the main test it is merged with. Also its status will not be reported since only the status of the main test is expected in the test report, e.g. the test tests/auto/testlib/selftests. Change-Id: Icfdf99300aae18040e1a3441a8af21f68df4c0db Reviewed-by: Rohan McGovern Reviewed-by: Jason McDonald --- src/testlib/qtestlog_p.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/testlib/qtestlog_p.h') diff --git a/src/testlib/qtestlog_p.h b/src/testlib/qtestlog_p.h index 1fe52367ec..1a9754e460 100644 --- a/src/testlib/qtestlog_p.h +++ b/src/testlib/qtestlog_p.h @@ -103,6 +103,9 @@ public: static void resetCounters(); + static void setInstalledTestCoverage(bool installed); + static bool installedTestCoverage(); + private: QTestLog(); ~QTestLog(); -- cgit v1.2.3