(source)
| 261 | r"(?P<name>[\w\d./\\]+[.]src)['\"]", re.I) |
| 262 | |
| 263 | def resolve_includes(source): |
| 264 | d = os.path.dirname(source) |
| 265 | with open(source) as fid: |
| 266 | lines = [] |
| 267 | for line in fid: |
| 268 | m = include_src_re.match(line) |
| 269 | if m: |
| 270 | fn = m.group('name') |
| 271 | if not os.path.isabs(fn): |
| 272 | fn = os.path.join(d, fn) |
| 273 | if os.path.isfile(fn): |
| 274 | lines.extend(resolve_includes(fn)) |
| 275 | else: |
| 276 | lines.append(line) |
| 277 | else: |
| 278 | lines.append(line) |
| 279 | return lines |
| 280 | |
| 281 | def process_file(source): |
| 282 | lines = resolve_includes(source) |
no test coverage detected