Index: build/android/gyp/emma_instr.py |
diff --git a/build/android/gyp/emma_instr.py b/build/android/gyp/emma_instr.py |
index 60484989c0ebd8516e0802593e44fb35a0ccb22d..9ba67769b60c8c3cb1c24b013435974557153a2a 100755 |
--- a/build/android/gyp/emma_instr.py |
+++ b/build/android/gyp/emma_instr.py |
@@ -58,8 +58,6 @@ |
help='Space separated list of source files. ' |
'source-dirs should not be specified if ' |
'source-files is specified') |
- option_parser.add_option('--java-sources-file', |
- help='File containing newline-separated .java paths') |
option_parser.add_option('--src-root', |
help='Root of the src repository.') |
option_parser.add_option('--emma-jar', |
@@ -104,15 +102,17 @@ |
build_utils.GetPythonDependencies()) |
-def _GetSourceDirsFromSourceFiles(source_files): |
- """Returns list of directories for the files in |source_files|. |
- |
- Args: |
- source_files: List of source files. |
+def _GetSourceDirsFromSourceFiles(source_files_string): |
+ """Returns list of directories for the files in |source_files_string|. |
+ |
+ Args: |
+ source_files_string: String generated from GN or GYP containing the list |
+ of source files. |
Returns: |
List of source directories. |
""" |
+ source_files = build_utils.ParseGypList(source_files_string) |
return list(set(os.path.dirname(source_file) for source_file in source_files)) |
@@ -158,8 +158,7 @@ |
""" |
if not (options.input_path and options.output_path and |
options.coverage_file and options.sources_list_file and |
- (options.source_files or options.source_dirs or |
- options.java_sources_file) and |
+ (options.source_files or options.source_dirs) and |
options.src_root and options.emma_jar): |
option_parser.error('All arguments are required.') |
@@ -197,13 +196,7 @@ |
if options.source_dirs: |
source_dirs = build_utils.ParseGypList(options.source_dirs) |
else: |
- source_files = [] |
- if options.source_files: |
- source_files += build_utils.ParseGypList(options.source_files) |
- if options.java_sources_file: |
- with open(options.java_sources_file) as f: |
- source_files.extend(l.strip() for l in f) |
- source_dirs = _GetSourceDirsFromSourceFiles(source_files) |
+ source_dirs = _GetSourceDirsFromSourceFiles(options.source_files) |
_CreateSourcesListFile(source_dirs, options.sources_list_file, |
options.src_root) |