Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2156)

Unified Diff: build/android/gyp/emma_instr.py

Issue 25814002: [Android] Enable passing filter string to emma. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/instr_action.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/emma_instr.py
diff --git a/build/android/gyp/emma_instr.py b/build/android/gyp/emma_instr.py
index ae20cac64790307ac1b9a335278b9d636293b610..43951d23abebee53e3cdfea4fc700aa29aa74ca0 100755
--- a/build/android/gyp/emma_instr.py
+++ b/build/android/gyp/emma_instr.py
@@ -57,6 +57,10 @@ def _AddInstrumentOptions(option_parser):
help='Root of the src repository.')
option_parser.add_option('--emma-jar',
help='Path to emma.jar.')
+ option_parser.add_option(
+ '--filter-string', default='',
+ help=('Filter string consisting of a list of inclusion/exclusion '
+ 'patterns separated with whitespace and/or comma.'))
def _RunCopyCommand(command, options, args, option_parser):
@@ -150,13 +154,14 @@ def _RunInstrumentCommand(command, options, args, option_parser):
options.sources_file)
temp_dir = tempfile.mkdtemp()
try:
- # TODO(gkanwar): Add '-ix' option to filter out useless classes.
- build_utils.CheckCallDie(['java', '-cp', options.emma_jar,
- 'emma', 'instr',
- '-ip', options.input_path,
- '-d', temp_dir,
- '-out', coverage_file,
- '-m', 'fullcopy'], suppress_output=True)
+ cmd = ['java', '-cp', options.emma_jar,
+ 'emma', 'instr',
+ '-ip', options.input_path,
+ '-ix', options.filter_string,
+ '-d', temp_dir,
+ '-out', coverage_file,
+ '-m', 'fullcopy']
+ build_utils.CheckCallDie(cmd, suppress_output=True)
if command == 'instrument_jar':
for jar in os.listdir(os.path.join(temp_dir, 'lib')):
« no previous file with comments | « no previous file | build/android/instr_action.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698