OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # This file is meant to be included into an action to provide a rule that | 5 # This file is meant to be included into an action to provide a rule that |
6 # instruments either java class files, or jars. | 6 # instruments either java class files, or jars. |
7 | 7 |
8 { | 8 { |
9 'variables': { | 9 'variables': { |
10 'instr_type%': 'jar', | 10 'instr_type%': 'jar', |
11 'input_path%': '', | 11 'input_path%': '', |
12 'output_path%': '', | 12 'output_path%': '', |
13 'stamp_path%': '', | 13 'stamp_path%': '', |
14 'extra_instr_args': [ | 14 'extra_instr_args': [ |
15 '--coverage-file=<(_target_name).em', | 15 '--coverage-file=<(_target_name).em', |
16 '--sources-file=<(_target_name)_sources.txt', | 16 '--sources-file=<(_target_name)_sources.txt', |
17 ], | 17 ], |
18 'emma_jar': '<(android_sdk_root)/tools/lib/emma.jar', | 18 'emma_jar': '<(android_sdk_root)/tools/lib/emma.jar', |
19 'conditions': [ | 19 'conditions': [ |
20 ['emma_instrument != 0', { | 20 ['emma_instrument != 0', { |
21 'extra_instr_args': [ | 21 'extra_instr_args': [ |
22 '--sources=<(java_in_dir)/src >(additional_src_dirs) >(generated_src_d
irs)', | 22 '--sources=<(java_in_dir)/src >(additional_src_dirs) >(generated_src_d
irs)', |
23 '--src-root=<(DEPTH)', | 23 '--src-root=<(DEPTH)', |
24 '--emma-jar=<(emma_jar)', | 24 '--emma-jar=<(emma_jar)', |
| 25 '--filter-string=<(emma_filter)', |
25 ], | 26 ], |
26 'conditions': [ | 27 'conditions': [ |
27 ['instr_type == "jar"', { | 28 ['instr_type == "jar"', { |
28 'instr_action': 'instrument_jar', | 29 'instr_action': 'instrument_jar', |
29 }, { | 30 }, { |
30 'instr_action': 'instrument_classes', | 31 'instr_action': 'instrument_classes', |
31 }] | 32 }] |
32 ], | 33 ], |
33 }, { | 34 }, { |
34 'instr_action': 'copy', | 35 'instr_action': 'copy', |
35 'extra_instr_args': [], | 36 'extra_instr_args': [], |
36 }] | 37 }] |
37 ] | 38 ] |
38 }, | 39 }, |
39 'inputs': [ | 40 'inputs': [ |
40 '<(DEPTH)/build/android/gyp/emma_instr.py', | 41 '<(DEPTH)/build/android/gyp/emma_instr.py', |
41 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 42 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
42 '<(DEPTH)/build/android/pylib/utils/command_option_parser.py', | 43 '<(DEPTH)/build/android/pylib/utils/command_option_parser.py', |
43 ], | 44 ], |
44 'action': [ | 45 'action': [ |
45 'python', '<(DEPTH)/build/android/gyp/emma_instr.py', | 46 'python', '<(DEPTH)/build/android/gyp/emma_instr.py', |
46 '<(instr_action)', | 47 '<(instr_action)', |
47 '--input-path=<(input_path)', | 48 '--input-path=<(input_path)', |
48 '--output-path=<(output_path)', | 49 '--output-path=<(output_path)', |
49 '--stamp=<(stamp_path)', | 50 '--stamp=<(stamp_path)', |
50 '<@(extra_instr_args)', | 51 '<@(extra_instr_args)', |
51 ] | 52 ] |
52 } | 53 } |
OLD | NEW |