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

Unified Diff: build/android/pylib/utils/isolator.py

Issue 1922023002: 🐻 Fix ui_base_unittests on Android Swarming (adds missing data) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gen-isolates-android
Patch Set: @classmethod Created 4 years, 8 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 | ui/base/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/utils/isolator.py
diff --git a/build/android/pylib/utils/isolator.py b/build/android/pylib/utils/isolator.py
index 68faa38bde3b0580c0c30028a865351a1c978641..f8177e007395c93769b21014315fd6beb7824b6b 100644
--- a/build/android/pylib/utils/isolator.py
+++ b/build/android/pylib/utils/isolator.py
@@ -152,6 +152,16 @@ class Isolator(object):
else:
os.remove(p)
+ @classmethod
+ def _DestructiveMerge(cls, src, dest):
+ if os.path.exists(dest) and os.path.isdir(dest):
+ for p in os.listdir(src):
+ cls._DestructiveMerge(os.path.join(src, p), os.path.join(dest, p))
+ os.rmdir(src)
+ else:
+ shutil.move(src, dest)
+
+
def MoveOutputDeps(self):
"""Moves files from the output directory to the top level of
|self._isolate_deps_dir|.
@@ -176,6 +186,7 @@ class Isolator(object):
deps_out_dir, os.path.basename(constants.GetOutDirectory()))
if os.path.isdir(deps_product_dir):
for p in os.listdir(deps_product_dir):
- shutil.move(os.path.join(deps_product_dir, p), self._isolate_deps_dir)
+ Isolator._DestructiveMerge(os.path.join(deps_product_dir, p),
+ os.path.join(self._isolate_deps_dir, p))
os.rmdir(deps_product_dir)
os.rmdir(deps_out_dir)
« no previous file with comments | « no previous file | ui/base/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698