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': [], |
cjhopman
2013/08/30 17:59:40
--coverage-file and --sources-file are the same in
frankf
2013/08/30 18:12:36
Done.
| |
15 'emma_jar': '<(android_sdk_root)/tools/lib/emma.jar', | 15 'emma_jar': '<(android_sdk_root)/tools/lib/emma.jar', |
16 'conditions': [ | 16 'conditions': [ |
17 ['emma_instrument != 0', { | 17 ['emma_instrument != 0', { |
18 'extra_instr_args': [ | 18 'extra_instr_args': [ |
19 '--coverage-file=<(_target_name).em', | 19 '--coverage-file=<(_target_name).em', |
20 '--sources-file=<(_target_name)_sources.txt', | 20 '--sources-file=<(_target_name)_sources.txt', |
21 '--sources=<(java_in_dir)/src >(additional_src_dirs) >(generated_src_d irs)', | 21 '--sources=<(java_in_dir)/src >(additional_src_dirs) >(generated_src_d irs)', |
22 '--src-root=<(DEPTH)', | 22 '--src-root=<(DEPTH)', |
23 '--emma-jar=<(emma_jar)', | 23 '--emma-jar=<(emma_jar)', |
24 ], | 24 ], |
25 'conditions': [ | 25 'conditions': [ |
26 ['instr_type == "jar"', { | 26 ['instr_type == "jar"', { |
27 'instr_action': 'instrument_jar', | 27 'instr_action': 'instrument_jar', |
28 }, { | 28 }, { |
29 'instr_action': 'instrument_classes', | 29 'instr_action': 'instrument_classes', |
30 }] | 30 }] |
31 ], | 31 ], |
32 }, { | 32 }, { |
33 'instr_action': 'copy', | 33 'instr_action': 'copy', |
34 'extra_instr_args': [], | 34 'extra_instr_args': [ |
35 '--coverage-file=<(_target_name).em', | |
36 '--sources-file=<(_target_name)_sources.txt', | |
37 ], | |
35 }] | 38 }] |
36 ] | 39 ] |
37 }, | 40 }, |
38 'inputs': [ | 41 'inputs': [ |
39 '<(DEPTH)/build/android/gyp/emma_instr.py', | 42 '<(DEPTH)/build/android/gyp/emma_instr.py', |
40 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 43 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
41 '<(DEPTH)/build/android/pylib/utils/command_option_parser.py', | 44 '<(DEPTH)/build/android/pylib/utils/command_option_parser.py', |
42 ], | 45 ], |
43 'action': [ | 46 'action': [ |
44 'python', '<(DEPTH)/build/android/gyp/emma_instr.py', | 47 'python', '<(DEPTH)/build/android/gyp/emma_instr.py', |
45 '<(instr_action)', | 48 '<(instr_action)', |
46 '--input-path=<(input_path)', | 49 '--input-path=<(input_path)', |
47 '--output-path=<(output_path)', | 50 '--output-path=<(output_path)', |
48 '--stamp=<(stamp_path)', | 51 '--stamp=<(stamp_path)', |
49 '<@(extra_instr_args)', | 52 '<@(extra_instr_args)', |
50 ] | 53 ] |
51 } | 54 } |
OLD | NEW |