summaryrefslogtreecommitdiffstats
path: root/ceee/ceee.croc
blob: 8e513555c2bbdd308a916263be903f303a304a75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# -*- python -*-
# Crocodile config file for CEEE - settings common to all platforms
#

{
  # List of root directories, applied in order
  'roots' : [
    # Sub-paths we specifically care about and want to call out
    {
      'root' : '_/src',
      'altname' : 'ROOT',
    },
  ],

  # 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',
    },
    {
      'regexp' : '^ROOT/ceee/ie/testing/.*',
      'group' : 'test',
    },
    {
      'regexp' : '.*mock.*',
      'group' : 'test',
    },

    # Languages
    {
      'regexp' : '.*\\.(c|h)$',
      'language' : 'C',
    },
    {
      'regexp' : '.*\\.(cc|cpp|hpp)$',
      'language' : 'C++',
    },

    # Files/paths to include.  Specify these before the excludes, since rules
    # are in order.
    {
      'regexp' : '^ROOT/ceee/',
      'include' : 1,
    },
    # Don't include subversion or mercurial SCM dirs
    {
      'regexp' : '.*/(\\.svn|\\.hg)/',
      'include' : 0,
    },
    # Don't include output dirs
    {
      'regexp' : '.*/(Debug|Release|debug|release|sconsbuild|out|xcodebuild)/.*',
      'include' : 0,
    },
    # Don't include testing framework sources
    {
      'regexp' : '^ROOT/.*/testing/.*',
      'include' : 0,
    },
    # Don't include third-party source
    {
      'regexp' : '.*/third_party/',
      'include' : 0,
    },
  ],

  # Paths to add source from
  'add_files' : [
    'ROOT'
  ],

  # 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',
    },
  ],
}