summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkotwicz <pkotwicz@chromium.org>2015-11-17 13:28:30 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-17 21:29:23 +0000
commit5a353f01b5df17dbb8ccd73485b5253105d28d0d (patch)
tree15177f66f0a24a930def313dc684af23beda571e
parent35db390a4fe9bef22036e69683cdbcce0c6f9a49 (diff)
downloadchromium_src-5a353f01b5df17dbb8ccd73485b5253105d28d0d.zip
chromium_src-5a353f01b5df17dbb8ccd73485b5253105d28d0d.tar.gz
chromium_src-5a353f01b5df17dbb8ccd73485b5253105d28d0d.tar.bz2
Remove unused instr_action == 'instrument_classes' option from emma_instr.py
BUG=535290 Review URL: https://codereview.chromium.org/1445383002 Cr-Commit-Position: refs/heads/master@{#360164}
-rw-r--r--build/android/emma_instr_action.gypi9
-rwxr-xr-xbuild/android/gyp/emma_instr.py31
-rw-r--r--build/java.gypi1
-rw-r--r--build/java_apk.gypi1
4 files changed, 9 insertions, 33 deletions
diff --git a/build/android/emma_instr_action.gypi b/build/android/emma_instr_action.gypi
index fa6d062..5d22c26 100644
--- a/build/android/emma_instr_action.gypi
+++ b/build/android/emma_instr_action.gypi
@@ -7,7 +7,6 @@
{
'variables': {
- 'instr_type%': 'jar',
'input_path%': '',
'output_path%': '',
'stamp_path%': '',
@@ -24,13 +23,7 @@
'--emma-jar=<(emma_jar)',
'--filter-string=<(emma_filter)',
],
- 'conditions': [
- ['instr_type == "jar"', {
- 'instr_action': 'instrument_jar',
- }, {
- 'instr_action': 'instrument_classes',
- }]
- ],
+ 'instr_action': 'instrument_jar',
}, {
'instr_action': 'copy',
'extra_instr_args': [],
diff --git a/build/android/gyp/emma_instr.py b/build/android/gyp/emma_instr.py
index 6f3555a..b6fd2b4 100755
--- a/build/android/gyp/emma_instr.py
+++ b/build/android/gyp/emma_instr.py
@@ -8,12 +8,10 @@
This script corresponds to the 'emma_instr' action in the java build process.
Depending on whether emma_instrument is set, the 'emma_instr' action will either
-call one of the instrument commands, or the copy command.
+call the instrument command or the copy command.
Possible commands are:
- instrument_jar: Accepts a jar and instruments it using emma.jar.
-- instrument_classes: Accepts a directory containing java classes and
- instruments it using emma.jar.
- copy: Called when EMMA coverage is not enabled. This allows us to make
this a required step without necessarily instrumenting on every build.
Also removes any stale coverage files.
@@ -91,11 +89,7 @@ def _RunCopyCommand(_command, options, _, option_parser):
if os.path.exists(sources_file):
os.remove(sources_file)
- if os.path.isdir(options.input_path):
- shutil.rmtree(options.output_path, ignore_errors=True)
- shutil.copytree(options.input_path, options.output_path)
- else:
- shutil.copy(options.input_path, options.output_path)
+ shutil.copy(options.input_path, options.output_path)
if options.stamp:
build_utils.Touch(options.stamp)
@@ -129,13 +123,12 @@ def _CreateSourcesFile(sources_string, sources_file, src_root):
json.dump(relative_sources, f)
-def _RunInstrumentCommand(command, options, _, option_parser):
- """Instruments the classes/jar files using EMMA.
+def _RunInstrumentCommand(_command, options, _, option_parser):
+ """Instruments jar files using EMMA.
Args:
- command: 'instrument_jar' or 'instrument_classes'. This distinguishes
- whether we copy the output from the created lib/ directory, or classes/
- directory.
+ command: String indicating the command that was received to trigger
+ this function.
options: optparse options dictionary.
args: List of extra args from optparse.
option_parser: optparse.OptionParser object.
@@ -165,15 +158,9 @@ def _RunInstrumentCommand(command, options, _, option_parser):
'-m', 'fullcopy']
build_utils.CheckOutput(cmd)
- if command == 'instrument_jar':
- for jar in os.listdir(os.path.join(temp_dir, 'lib')):
- shutil.copy(os.path.join(temp_dir, 'lib', jar),
+ for jar in os.listdir(os.path.join(temp_dir, 'lib')):
+ shutil.copy(os.path.join(temp_dir, 'lib', jar),
options.output_path)
- else: # 'instrument_classes'
- if os.path.isdir(options.output_path):
- shutil.rmtree(options.output_path, ignore_errors=True)
- shutil.copytree(os.path.join(temp_dir, 'classes'),
- options.output_path)
finally:
shutil.rmtree(temp_dir)
@@ -192,8 +179,6 @@ VALID_COMMANDS = {
_RunCopyCommand),
'instrument_jar': CommandFunctionTuple(_AddInstrumentOptions,
_RunInstrumentCommand),
- 'instrument_classes': CommandFunctionTuple(_AddInstrumentOptions,
- _RunInstrumentCommand),
}
diff --git a/build/java.gypi b/build/java.gypi
index 9bc1f4b..f182e8c 100644
--- a/build/java.gypi
+++ b/build/java.gypi
@@ -331,7 +331,6 @@
'input_path': '<(jar_path)',
'output_path': '<(jar_final_path)',
'stamp_path': '<(emma_instr_stamp)',
- 'instr_type': 'jar',
},
'outputs': [
'<(jar_final_path)',
diff --git a/build/java_apk.gypi b/build/java_apk.gypi
index 658c99f..6c5e7bb 100644
--- a/build/java_apk.gypi
+++ b/build/java_apk.gypi
@@ -973,7 +973,6 @@
'input_path': '<(javac_jar_path)',
'output_path': '<(jar_path)',
'stamp_path': '<(emma_instr_stamp)',
- 'instr_type': 'jar',
},
'outputs': [
'<(emma_instr_stamp)',