| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2016 the V8 project authors. All rights reserved. | 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 | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 # CC/CXX wrapper script that excludes certain file patterns from coverage | 6 # CC/CXX wrapper script that excludes certain file patterns from coverage |
| 7 # instrumentation. | 7 # instrumentation. |
| 8 | 8 |
| 9 import re | 9 import re |
| 10 import subprocess | 10 import subprocess |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 args = sys.argv[1:] | 25 args = sys.argv[1:] |
| 26 text = ' '.join(sys.argv[2:]) | 26 text = ' '.join(sys.argv[2:]) |
| 27 for exclusion in exclusions: | 27 for exclusion in exclusions: |
| 28 if re.search(r'\-o obj/%s[^ ]*\.o' % exclusion, text): | 28 if re.search(r'\-o obj/%s[^ ]*\.o' % exclusion, text): |
| 29 remove_if_exists(args, '-fprofile-arcs') | 29 remove_if_exists(args, '-fprofile-arcs') |
| 30 remove_if_exists(args, '-ftest-coverage') | 30 remove_if_exists(args, '-ftest-coverage') |
| 31 remove_if_exists(args, '-fsanitize-coverage=func') | 31 remove_if_exists(args, '-fsanitize-coverage=func') |
| 32 remove_if_exists(args, '-fsanitize-coverage=bb') | 32 remove_if_exists(args, '-fsanitize-coverage=bb') |
| 33 remove_if_exists(args, '-fsanitize-coverage=edge') | 33 remove_if_exists(args, '-fsanitize-coverage=edge') |
| 34 remove_if_exists(args, '-fsanitize-coverage=trace-pc-guard') |
| 35 remove_if_exists(args, '-fsanitize-coverage=bb,trace-pc-guard') |
| 34 break | 36 break |
| 35 | 37 |
| 36 sys.exit(subprocess.check_call(args)) | 38 sys.exit(subprocess.check_call(args)) |
| OLD | NEW |