()
| 222 | |
| 223 | |
| 224 | def SetupReportGroups(): |
| 225 | default_report_groups = {"total": '.*', |
| 226 | "src": '\\.\\./\\.\\./src', |
| 227 | "test": '\\.\\./\\.\\./test', |
| 228 | "third_party": '\\.\\./\\.\\./third_party', |
| 229 | "gen": 'gen'} |
| 230 | |
| 231 | report_groups = default_report_groups.copy() |
| 232 | report_groups.update(dict(ARGS['group'])) |
| 233 | |
| 234 | if ARGS['only']: |
| 235 | for only_arg in ARGS['only']: |
| 236 | if not only_arg in report_groups.keys(): |
| 237 | print("Error: specified report group '{}' is not defined.".format( |
| 238 | ARGS['only'])) |
| 239 | exit(1) |
| 240 | else: |
| 241 | report_groups = { |
| 242 | k: v for (k, v) in report_groups.items() if k in ARGS['only']} |
| 243 | |
| 244 | if ARGS['not']: |
| 245 | report_groups = { |
| 246 | k: v for (k, v) in report_groups.items() if k not in ARGS['not']} |
| 247 | |
| 248 | if ARGS['list_groups']: |
| 249 | print_cat_max_width = MaxWidth(list(report_groups.keys()) + ["Category"]) |
| 250 | print(" {:<{}} {}".format("Category", |
| 251 | print_cat_max_width, "Regular expression")) |
| 252 | for cat, regexp_string in report_groups.items(): |
| 253 | print(" {:<{}}: {}".format( |
| 254 | cat, print_cat_max_width, regexp_string)) |
| 255 | |
| 256 | report_groups = {k: Group(k, v) for (k, v) in report_groups.items()} |
| 257 | |
| 258 | return report_groups |
| 259 | |
| 260 | |
| 261 | class Results: |
no test coverage detected
searching dependent graphs…