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 'input_path%': '', | 10 'input_path%': '', |
11 'output_path%': '', | 11 'output_path%': '', |
12 'stamp_path%': '', | 12 'stamp_path%': '', |
13 'extra_instr_args': [ | 13 'extra_instr_args': [ |
14 '--coverage-file=<(_target_name).em', | 14 '--coverage-file=<(coverage_file)', |
15 '--sources-file=<(_target_name)_sources.txt', | 15 '--sources-list-file=<(sources_list_file)', |
16 ], | 16 ], |
17 'emma_jar': '<(android_sdk_root)/tools/lib/emma.jar', | 17 'emma_jar': '<(android_sdk_root)/tools/lib/emma.jar', |
18 'conditions': [ | 18 'conditions': [ |
19 ['emma_instrument != 0', { | 19 ['emma_instrument != 0', { |
20 'extra_instr_args': [ | 20 'extra_instr_args': [ |
21 '--sources=<(java_in_dir)/src >(additional_src_dirs) >(generated_src_d
irs)', | 21 '--source-dirs=<(java_in_dir)/src >(additional_src_dirs) >(generated_s
rc_dirs)', |
22 '--src-root=<(DEPTH)', | 22 '--src-root=<(DEPTH)', |
23 '--emma-jar=<(emma_jar)', | 23 '--emma-jar=<(emma_jar)', |
24 '--filter-string=<(emma_filter)', | 24 '--filter-string=<(emma_filter)', |
25 ], | 25 ], |
26 'instr_action': 'instrument_jar', | 26 'instr_action': 'instrument_jar', |
27 }, { | 27 }, { |
28 'instr_action': 'copy', | 28 'instr_action': 'copy', |
29 'extra_instr_args': [], | 29 'extra_instr_args': [], |
30 }] | 30 }] |
31 ] | 31 ] |
32 }, | 32 }, |
33 'inputs': [ | 33 'inputs': [ |
34 '<(DEPTH)/build/android/gyp/emma_instr.py', | 34 '<(DEPTH)/build/android/gyp/emma_instr.py', |
35 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 35 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
36 '<(DEPTH)/build/android/pylib/utils/command_option_parser.py', | 36 '<(DEPTH)/build/android/pylib/utils/command_option_parser.py', |
37 ], | 37 ], |
38 'action': [ | 38 'action': [ |
39 'python', '<(DEPTH)/build/android/gyp/emma_instr.py', | 39 'python', '<(DEPTH)/build/android/gyp/emma_instr.py', |
40 '<(instr_action)', | 40 '<(instr_action)', |
41 '--input-path=<(input_path)', | 41 '--input-path=<(input_path)', |
42 '--output-path=<(output_path)', | 42 '--output-path=<(output_path)', |
43 '--stamp=<(stamp_path)', | 43 '--stamp=<(stamp_path)', |
44 '<@(extra_instr_args)', | 44 '<@(extra_instr_args)', |
45 ] | 45 ] |
46 } | 46 } |
OLD | NEW |