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

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

Issue 1542173002: Fix build when emma_coverage changes from false->true (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | no next file » | 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 c6ef6183935dd40d2412088eee58eb94238b3d12..f63aef6f7a330358be768bcc7297eda7eadab876 100755
--- a/build/android/gyp/emma_instr.py
+++ b/build/android/gyp/emma_instr.py
@@ -181,7 +181,11 @@ def _RunInstrumentCommand(_command, options, _, option_parser):
print('Error: multiple output files in: %s' % (temp_jar_dir))
return 1
- shutil.copy(os.path.join(temp_jar_dir, jars[0]), options.output_path)
+ # Delete output_path first to avoid modifying input_path in the case where
+ # input_path is a hardlink to output_path. http://crbug.com/571642
jbudorick 2015/12/22 19:34:44 I'm confused about how this fixes 571642. That fai
agrieve 2015/12/22 20:10:00 1. Build once without coverage enabled, and there'
jbudorick 2015/12/22 20:42:35 ah, ok. lgtm
+ if os.path.exists(options.output_path):
+ os.unlink(options.output_path)
+ shutil.move(os.path.join(temp_jar_dir, jars[0]), options.output_path)
finally:
shutil.rmtree(temp_dir)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698