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

Issue 113980: Major refactoring of Croc.... (Closed)

Created:
11 years, 7 months ago by Randall Spangler
Modified:
9 years, 7 months ago
Reviewers:
John Grabowski, bradn
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Major refactoring of Croc. Add support for scanning missing source files for executable lines. Add support for HTML output. Now reports percent coverage. BUG=none TEST=by hand on experimental buildbot Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=17141

Patch Set 1 #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+1321 lines, -320 lines) Patch
A build/common.croc View 1 chunk +100 lines, -0 lines 2 comments Download
M build/linux/chrome_linux.croc View 2 chunks +2 lines, -51 lines 0 comments Download
M build/mac/chrome_mac.croc View 4 chunks +3 lines, -49 lines 1 comment Download
M tools/code_coverage/croc.py View 27 chunks +139 lines, -90 lines 0 comments Download
A tools/code_coverage/croc_html.py View 1 chunk +453 lines, -0 lines 2 comments Download
A tools/code_coverage/croc_scan.py View 1 chunk +192 lines, -0 lines 4 comments Download
A tools/code_coverage/croc_scan_test.py View 1 chunk +219 lines, -0 lines 0 comments Download
M tools/code_coverage/croc_test.py View 24 chunks +213 lines, -130 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
Randall Spangler
11 years, 7 months ago (2009-05-28 23:33:47 UTC) #1
bradn
LGTM, generally. How portable is it? http://codereview.chromium.org/113980/diff/1/6 File tools/code_coverage/croc_scan.py (right): http://codereview.chromium.org/113980/diff/1/6#newcode151 Line 151: # TODO: ...
11 years, 7 months ago (2009-05-28 23:57:36 UTC) #2
Randall Spangler
http://codereview.chromium.org/113980/diff/1/8 File tools/code_coverage/croc_test.py (right): http://codereview.chromium.org/113980/diff/1/8#newcode418 Line 418: 'SF:c:\\source\\c.c', On 2009/05/28 23:57:36, bradn wrote: > Does ...
11 years, 7 months ago (2009-05-29 00:02:57 UTC) #3
John Grabowski
11 years, 7 months ago (2009-05-29 00:34:43 UTC) #4
http://codereview.chromium.org/113980/diff/1/4
File build/common.croc (right):

http://codereview.chromium.org/113980/diff/1/4#newcode1
Line 1: # -*- python -*-
Need standard Chromium copyright here.  By analogy, chrome.gyp has one.

http://codereview.chromium.org/113980/diff/1/4#newcode65
Line 65: 'format' : '*RESULT FilesInstrumentedPercent:
files_instrumented_percent= %g',
>80

http://codereview.chromium.org/113980/diff/1/3
File build/mac/chrome_mac.croc (right):

http://codereview.chromium.org/113980/diff/1/3#newcode13
Line 13: # Don't include subversion or mercurial SCM dirs
Seems a few more rules here (no svn, output dirs, third-party) should be moved
into the common croc.

http://codereview.chromium.org/113980/diff/1/7
File tools/code_coverage/croc_html.py (right):

http://codereview.chromium.org/113980/diff/1/7#newcode1
Line 1: #!/usr/bin/python2.4
/usr/bin/env python?
Non-Google machines won't necessarily have py2.4

http://codereview.chromium.org/113980/diff/1/7#newcode3
Line 3: # Copyright 2009, Google Inc.
(c) the Chromium authors?

http://codereview.chromium.org/113980/diff/1/6
File tools/code_coverage/croc_scan.py (right):

http://codereview.chromium.org/113980/diff/1/6#newcode1
Line 1: #!/usr/bin/python2.4
Ditto comments form other files (py2.4, copyright)

http://codereview.chromium.org/113980/diff/1/6#newcode32
Line 32: """Crocodile source scanners."""
Elaborate a little.  Why is a scanner useful?  What does it get me?

http://codereview.chromium.org/113980/diff/1/6#newcode143
Line 143: self.re_token = re.compile(r'(#|\'\'\'|"""|(?<!(?<!\\)\\)["\'])')
Comments around regexps explaing what they are supposed to match are helpful. 
Ditto other places in this file.

Powered by Google App Engine
This is Rietveld 408576698