OLD | NEW |
| (Empty) |
1 #!/usr/bin/env python | |
2 # Copyright 2016 the V8 project authors. All rights reserved. | |
3 # Use of this source code is governed by a BSD-style license that can be | |
4 # found in the LICENSE file. | |
5 | |
6 # CC/CXX wrapper script that excludes certain file patterns from coverage | |
7 # instrumentation. | |
8 | |
9 import re | |
10 import subprocess | |
11 import sys | |
12 | |
13 exclusions = [ | |
14 'src/third_party', | |
15 'third_party', | |
16 'test', | |
17 'testing', | |
18 ] | |
19 | |
20 args = sys.argv[1:] | |
21 text = ' '.join(sys.argv[2:]) | |
22 for exclusion in exclusions: | |
23 if re.search(r'\-o obj/%s[^ ]*\.o' % exclusion, text): | |
24 args.remove('-fprofile-arcs') | |
25 args.remove('-ftest-coverage') | |
26 break | |
27 | |
28 sys.exit(subprocess.check_call(args)) | |
OLD | NEW |