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

Unified Diff: build/android/pylib/gtest/setup.py

Issue 184733006: [Android] Fix gtest test scripts for non-default CHROMIUM_OUT_DIR. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/gtest/setup.py
diff --git a/build/android/pylib/gtest/setup.py b/build/android/pylib/gtest/setup.py
index 3f2340f88a22bdee8eb73b4a1355b42091218d82..5fe0bedb6b5ef10a1d2674517dafdbc4c0ae6dc8 100644
--- a/build/android/pylib/gtest/setup.py
+++ b/build/android/pylib/gtest/setup.py
@@ -162,19 +162,20 @@ def _GenerateDepsDirUsingIsolate(suite_name):
# On Android, all pak files need to be in the top-level 'paks' directory.
paks_dir = os.path.join(constants.ISOLATE_DEPS_DIR, 'paks')
os.mkdir(paks_dir)
- for root, _, filenames in os.walk(os.path.join(constants.ISOLATE_DEPS_DIR,
- 'out')):
+
+ deps_out_dir = os.path.join(
+ constants.ISOLATE_DEPS_DIR, os.environ.get('CHROMIUM_OUT_DIR', 'out'))
frankf 2014/03/05 01:33:59 You're duplicating constants.GetOutDirectory(). Al
jbudorick 2014/03/07 07:15:28 I tried constants.GetOutDirectory() at first becau
frankf 2014/03/10 17:35:34 Why can't we do os.path.join(constants.GetOutDirec
jbudorick 2014/03/11 14:25:09 We can, and I'm ok with doing so, but how is that
frankf 2014/03/11 16:27:34 It's DRY. Also you're encapsulating how the path i
+ for root, _, filenames in os.walk(deps_out_dir):
for filename in fnmatch.filter(filenames, '*.pak'):
shutil.move(os.path.join(root, filename), paks_dir)
# Move everything in PRODUCT_DIR to top level.
- deps_product_dir = os.path.join(constants.ISOLATE_DEPS_DIR, 'out',
- constants.GetBuildType())
+ deps_product_dir = os.path.join(deps_out_dir, constants.GetBuildType())
if os.path.isdir(deps_product_dir):
for p in os.listdir(deps_product_dir):
shutil.move(os.path.join(deps_product_dir, p), constants.ISOLATE_DEPS_DIR)
os.rmdir(deps_product_dir)
- os.rmdir(os.path.join(constants.ISOLATE_DEPS_DIR, 'out'))
+ os.rmdir(deps_out_dir)
def _GetDisabledTestsFilterFromFile(suite_name):
« 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