summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorrspangler@google.com <rspangler@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 00:05:27 +0000
committerrspangler@google.com <rspangler@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 00:05:27 +0000
commit0df95fd432f9023ce03548c2aba8ca4d774910f7 (patch)
treeacbe04cf1e31e36219d04781ec54ae6b30a10de8 /build
parente778c9cf2d6ffd74e4ed3bd88f381752c3c15a4a (diff)
downloadchromium_src-0df95fd432f9023ce03548c2aba8ca4d774910f7.zip
chromium_src-0df95fd432f9023ce03548c2aba8ca4d774910f7.tar.gz
chromium_src-0df95fd432f9023ce03548c2aba8ca4d774910f7.tar.bz2
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 Review URL: http://codereview.chromium.org/113980 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17141 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r--build/common.croc100
-rw-r--r--build/linux/chrome_linux.croc53
-rw-r--r--build/mac/chrome_mac.croc52
3 files changed, 105 insertions, 100 deletions
diff --git a/build/common.croc b/build/common.croc
new file mode 100644
index 0000000..3c07d63
--- /dev/null
+++ b/build/common.croc
@@ -0,0 +1,100 @@
+# -*- python -*-
+# Crocodile config file for Chromium - settings common to all platforms
+#
+# This should be speicified before the platform-specific config, for example:
+# croc -c chrome_common.croc -c linux/chrome_linux.croc
+
+{
+ # List of root directories, applied in order
+ 'roots' : [
+ # Sub-paths we specifically care about and want to call out
+ {
+ 'root' : '_/src',
+ 'altname' : 'CHROMIUM',
+ },
+ ],
+
+ # List of rules, applied in order
+ # Note that any 'include':0 rules here will be overridden by the 'include':1
+ # rules in the platform-specific configs.
+ 'rules' : [
+ # Don't scan for executable lines in uninstrumented C++ header files
+ {
+ 'regexp' : '.*\\.(h|hpp)$',
+ 'add_if_missing' : 0,
+ },
+
+ # Groups
+ {
+ 'regexp' : '',
+ 'group' : 'source',
+ },
+ {
+ 'regexp' : '.*_(test|unittest)\\.',
+ 'group' : 'test',
+ },
+
+ # Languages
+ {
+ 'regexp' : '.*\\.(c|h)$',
+ 'language' : 'C',
+ },
+ {
+ 'regexp' : '.*\\.(cc|cpp|hpp)$',
+ 'language' : 'C++',
+ },
+ ],
+
+ # Paths to add source from
+ 'add_files' : [
+ 'CHROMIUM'
+ ],
+
+ # Statistics to print
+ 'print_stats' : [
+ {
+ 'stat' : 'files_executable',
+ 'format' : '*RESULT FilesKnown: files_executable= %d files',
+ },
+ {
+ 'stat' : 'files_instrumented',
+ 'format' : '*RESULT FilesInstrumented: files_instrumented= %d files',
+ },
+ {
+ 'stat' : '100.0 * files_instrumented / files_executable',
+ 'format' : '*RESULT FilesInstrumentedPercent: files_instrumented_percent= %g',
+ },
+ {
+ 'stat' : 'lines_executable',
+ 'format' : '*RESULT LinesKnown: lines_known= %d lines',
+ },
+ {
+ 'stat' : 'lines_instrumented',
+ 'format' : '*RESULT LinesInstrumented: lines_instrumented= %d lines',
+ },
+ {
+ 'stat' : 'lines_covered',
+ 'format' : '*RESULT LinesCoveredSource: lines_covered_source= %d lines',
+ 'group' : 'source',
+ },
+ {
+ 'stat' : 'lines_covered',
+ 'format' : '*RESULT LinesCoveredTest: lines_covered_test= %d lines',
+ 'group' : 'test',
+ },
+ {
+ 'stat' : '100.0 * lines_covered / lines_executable',
+ 'format' : '*RESULT PercentCovered: percent_covered= %g',
+ },
+ {
+ 'stat' : '100.0 * lines_covered / lines_executable',
+ 'format' : '*RESULT PercentCoveredSource: percent_covered_source= %g',
+ 'group' : 'source',
+ },
+ {
+ 'stat' : '100.0 * lines_covered / lines_executable',
+ 'format' : '*RESULT PercentCoveredTest: percent_covered_test= %g',
+ 'group' : 'test',
+ },
+ ],
+}
diff --git a/build/linux/chrome_linux.croc b/build/linux/chrome_linux.croc
index f4f10b5..eb2e039 100644
--- a/build/linux/chrome_linux.croc
+++ b/build/linux/chrome_linux.croc
@@ -7,7 +7,7 @@
# Files/paths to include. Specify these before the excludes, since rules
# are in order.
{
- 'regexp' : '^#/src/(base|media|net|printing)/',
+ 'regexp' : '^CHROMIUM/(base|media|net|printing)/',
'include' : 1,
},
# Don't include subversion or mercurial SCM dirs
@@ -33,56 +33,7 @@
# Groups
{
- 'regexp' : '',
- 'group' : 'source',
- },
- {
- 'regexp' : '.*_(test|test_linux|unittest)\\.',
- 'group' : 'test',
- },
-
- # Languages
- {
- 'regexp' : '.*\\.(c|h)$',
- 'language' : 'C',
- },
- {
- 'regexp' : '.*\\.(cc|cpp|hpp)$',
- 'language' : 'C++',
- },
- ],
-
- # Paths to add source from
- 'add_files' : [
- '#/src'
- ],
-
- # Statistics to print
- 'print_stats' : [
- {
- 'stat' : 'files_executable',
- 'format' : '*RESULT FilesKnown: files_executable= %d files',
- },
- {
- 'stat' : 'files_instrumented',
- 'format' : '*RESULT FilesInstrumented: files_instrumented= %d files',
- },
- {
- 'stat' : '100.0 * files_instrumented / files_executable',
- 'format' : '*RESULT FilesInstrumentedPercent: files_instrumented_percent= %g',
- },
- {
- 'stat' : 'lines_instrumented',
- 'format' : '*RESULT LinesInstrumented: lines_instrumented= %d lines',
- },
- {
- 'stat' : 'lines_covered',
- 'format' : '*RESULT LinesCoveredSource: lines_covered_source= %d lines',
- 'group' : 'source',
- },
- {
- 'stat' : 'lines_covered',
- 'format' : '*RESULT LinesCoveredTest: lines_covered_test= %d lines',
+ 'regexp' : '.*_test_linux\\.',
'group' : 'test',
},
],
diff --git a/build/mac/chrome_mac.croc b/build/mac/chrome_mac.croc
index 356e453..e8a6dad 100644
--- a/build/mac/chrome_mac.croc
+++ b/build/mac/chrome_mac.croc
@@ -1,3 +1,4 @@
+# -*- python -*-
# Crocodile config file for Chromium mac
{
@@ -6,7 +7,7 @@
# Files/paths to include. Specify these before the excludes, since rules
# are in order.
{
- 'regexp' : '^#/src/(base|media|net|printing)/',
+ 'regexp' : '^CHROMIUM/(base|media|net|printing)/',
'include' : 1,
},
# Don't include subversion or mercurial SCM dirs
@@ -32,24 +33,12 @@
# Groups
{
- 'regexp' : '',
- 'group' : 'source',
- },
- {
- 'regexp' : '.*_(test|test_mac|unittest)\\.',
+ 'regexp' : '.*_test_mac\\.',
'group' : 'test',
},
# Languages
{
- 'regexp' : '.*\\.(c|h)$',
- 'language' : 'C',
- },
- {
- 'regexp' : '.*\\.(cc|cpp|hpp)$',
- 'language' : 'C++',
- },
- {
'regexp' : '.*\\.m$',
'language' : 'ObjC',
},
@@ -58,39 +47,4 @@
'language' : 'ObjC++',
},
],
-
- # Paths to add source from
- 'add_files' : [
- '#/src'
- ],
-
- # Statistics to print
- 'print_stats' : [
- {
- 'stat' : 'files_executable',
- 'format' : '*RESULT FilesKnown: files_executable= %d files',
- },
- {
- 'stat' : 'files_instrumented',
- 'format' : '*RESULT FilesInstrumented: files_instrumented= %d files',
- },
- {
- 'stat' : '100.0 * files_instrumented / files_executable',
- 'format' : '*RESULT FilesInstrumentedPercent: files_instrumented_percent= %g',
- },
- {
- 'stat' : 'lines_instrumented',
- 'format' : '*RESULT LinesInstrumented: lines_instrumented= %d lines',
- },
- {
- 'stat' : 'lines_covered',
- 'format' : '*RESULT LinesCoveredSource: lines_covered_source= %d lines',
- 'group' : 'source',
- },
- {
- 'stat' : 'lines_covered',
- 'format' : '*RESULT LinesCoveredTest: lines_covered_test= %d lines',
- 'group' : 'test',
- },
- ],
}