summaryrefslogtreecommitdiffstats
path: root/tools/code_coverage
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-07 23:56:45 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-07 23:56:45 +0000
commitbb56b443c1ee2ca9d4a636768ff16216d8565878 (patch)
tree53f2a8d9f90a50c8f85bc477c6ed678f0c75d882 /tools/code_coverage
parent4c48642bad516610704dd6ec7b7ec1cc09dabbb2 (diff)
downloadchromium_src-bb56b443c1ee2ca9d4a636768ff16216d8565878.zip
chromium_src-bb56b443c1ee2ca9d4a636768ff16216d8565878.tar.gz
chromium_src-bb56b443c1ee2ca9d4a636768ff16216d8565878.tar.bz2
Now that we append to this file instead of clobbering it each time
(since tests are run one at a time) we need to delete it before we begin on Windows. Review URL: http://codereview.chromium.org/460129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34019 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/code_coverage')
-rwxr-xr-xtools/code_coverage/coverage_posix.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/tools/code_coverage/coverage_posix.py b/tools/code_coverage/coverage_posix.py
index bec3f3b..82d663a 100755
--- a/tools/code_coverage/coverage_posix.py
+++ b/tools/code_coverage/coverage_posix.py
@@ -146,15 +146,15 @@ class Coverage(object):
"""Trim specific tests for each platform."""
if self.IsWindows():
return
- # Special case to be fast, as needed...
- # TODO(jrg): remove
- inclusion = ['base_unittests']
+ # TODO(jrg): remove when not needed
+ inclusion = ['unit_tests']
keep = []
for test in self.tests:
for i in inclusion:
if i in test:
keep.append(test)
self.tests = keep
+ logging.info('After trimming tests we have ' + ' '.join(self.tests))
return
if self.IsLinux():
return
@@ -207,14 +207,13 @@ class Coverage(object):
def ClearData(self):
"""Clear old gcda files and old coverage info files."""
- if not self.IsPosix():
- return
- subprocess.call([self.lcov,
- '--directory', self.directory_parent,
- '--zerocounters'])
- shutil.rmtree(os.path.join(self.directory, 'coverage'))
if os.path.exists(self.coverage_info_file):
os.remove(self.coverage_info_file)
+ if self.IsPosix():
+ subprocess.call([self.lcov,
+ '--directory', self.directory_parent,
+ '--zerocounters'])
+ shutil.rmtree(os.path.join(self.directory, 'coverage'))
def BeforeRunOneTest(self, testname):
"""Do things before running each test."""