common.croc 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. # -*- python -*-
  2. # Crocodile config file for Chromium - settings common to all platforms
  3. #
  4. # This should be speicified before the platform-specific config, for example:
  5. # croc -c chrome_common.croc -c linux/chrome_linux.croc
  6. {
  7. # List of root directories, applied in order
  8. 'roots' : [
  9. # Sub-paths we specifically care about and want to call out
  10. {
  11. 'root' : '_/src',
  12. 'altname' : 'CHROMIUM',
  13. },
  14. ],
  15. # List of rules, applied in order
  16. # Note that any 'include':0 rules here will be overridden by the 'include':1
  17. # rules in the platform-specific configs.
  18. 'rules' : [
  19. # Don't scan for executable lines in uninstrumented C++ header files
  20. {
  21. 'regexp' : '.*\\.(h|hpp)$',
  22. 'add_if_missing' : 0,
  23. },
  24. # Groups
  25. {
  26. 'regexp' : '',
  27. 'group' : 'source',
  28. },
  29. {
  30. 'regexp' : '.*_(test|unittest|uitest|browsertest)\\.',
  31. 'group' : 'test',
  32. },
  33. # Languages
  34. {
  35. 'regexp' : '.*\\.(c|h)$',
  36. 'language' : 'C',
  37. },
  38. {
  39. 'regexp' : '.*\\.(cc|cpp|hpp)$',
  40. 'language' : 'C++',
  41. },
  42. # Files/paths to include. Specify these before the excludes, since rules
  43. # are in order.
  44. {
  45. 'regexp' : '^CHROMIUM/(base|media|net|printing|remoting|chrome|content|webkit/glue|native_client)/',
  46. 'include' : 1,
  47. },
  48. # Don't include subversion or mercurial SCM dirs
  49. {
  50. 'regexp' : '.*/(\\.svn|\\.hg)/',
  51. 'include' : 0,
  52. },
  53. # Don't include output dirs
  54. {
  55. 'regexp' : '.*/(Debug|Release|sconsbuild|out|xcodebuild)/',
  56. 'include' : 0,
  57. },
  58. # Don't include third-party source
  59. {
  60. 'regexp' : '.*/third_party/',
  61. 'include' : 0,
  62. },
  63. # We don't run the V8 test suite, so we don't care about V8 coverage.
  64. {
  65. 'regexp' : '.*/v8/',
  66. 'include' : 0,
  67. },
  68. ],
  69. # Paths to add source from
  70. 'add_files' : [
  71. 'CHROMIUM'
  72. ],
  73. # Statistics to print
  74. 'print_stats' : [
  75. {
  76. 'stat' : 'files_executable',
  77. 'format' : '*RESULT FilesKnown: files_executable= %d files',
  78. },
  79. {
  80. 'stat' : 'files_instrumented',
  81. 'format' : '*RESULT FilesInstrumented: files_instrumented= %d files',
  82. },
  83. {
  84. 'stat' : '100.0 * files_instrumented / files_executable',
  85. 'format' : '*RESULT FilesInstrumentedPercent: files_instrumented_percent= %g',
  86. },
  87. {
  88. 'stat' : 'lines_executable',
  89. 'format' : '*RESULT LinesKnown: lines_known= %d lines',
  90. },
  91. {
  92. 'stat' : 'lines_instrumented',
  93. 'format' : '*RESULT LinesInstrumented: lines_instrumented= %d lines',
  94. },
  95. {
  96. 'stat' : 'lines_covered',
  97. 'format' : '*RESULT LinesCoveredSource: lines_covered_source= %d lines',
  98. 'group' : 'source',
  99. },
  100. {
  101. 'stat' : 'lines_covered',
  102. 'format' : '*RESULT LinesCoveredTest: lines_covered_test= %d lines',
  103. 'group' : 'test',
  104. },
  105. {
  106. 'stat' : '100.0 * lines_covered / lines_executable',
  107. 'format' : '*RESULT PercentCovered: percent_covered= %g',
  108. },
  109. {
  110. 'stat' : '100.0 * lines_covered / lines_executable',
  111. 'format' : '*RESULT PercentCoveredSource: percent_covered_source= %g',
  112. 'group' : 'source',
  113. },
  114. {
  115. 'stat' : '100.0 * lines_covered / lines_executable',
  116. 'format' : '*RESULT PercentCoveredTest: percent_covered_test= %g',
  117. 'group' : 'test',
  118. },
  119. ],
  120. }