Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: tools/code_coverage/croc_test.py

Issue 660142: Add resilience in croc to a failed build (e.g. 0 stats generated).... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/code_coverage/croc.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/code_coverage/croc_test.py
===================================================================
--- tools/code_coverage/croc_test.py (revision 39945)
+++ tools/code_coverage/croc_test.py (working copy)
@@ -650,6 +650,22 @@
# In the real os.walk() call this prunes the walk.
self.assertEqual(self.mock_walk_return[0][1], ['subdir'])
+
+ def testEmptyTreeStats(self):
+ """Make sure we don't choke when absolutely nothing happened.
+
+ How we might hit this: bot compile error."""
+ c = self.cov_minimal
+ t = c.tree
+ t.stats_by_group['all'].AddDefaults()
+ self.assertEqual(t.stats_by_group, {
+ 'all': { 'files_covered': 0,
+ 'files_instrumented': 0,
+ 'files_executable': 0,
+ 'lines_covered': 0,
+ 'lines_instrumented': 0,
+ 'lines_executable': 0 }})
+
def testUpdateTreeStats(self):
"""Test UpdateTreeStats()."""
Property changes on: tools/code_coverage/croc_test.py
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « tools/code_coverage/croc.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698