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

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

Issue 22933005: [android] Make build_type a singleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix call to _LogToFile Created 7 years, 4 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
Index: build/android/pylib/gtest/setup.py
diff --git a/build/android/pylib/gtest/setup.py b/build/android/pylib/gtest/setup.py
index 2e70dd07f30bf45d29644e4d5d519a2b88119dff..44fef19feb8405a2c9542d0f50a8c7e07636087d 100644
--- a/build/android/pylib/gtest/setup.py
+++ b/build/android/pylib/gtest/setup.py
@@ -69,14 +69,14 @@ _ISOLATE_SCRIPT = os.path.join(
constants.DIR_SOURCE_ROOT, 'tools', 'swarm_client', 'isolate.py')
-def _GenerateDepsDirUsingIsolate(suite_name, build_type):
+def _GenerateDepsDirUsingIsolate(suite_name):
"""Generate the dependency dir for the test suite using isolate.
Args:
suite_name: Name of the test suite (e.g. base_unittests).
- build_type: Release/Debug
"""
- product_dir = os.path.join(cmd_helper.OutDirectory.get(), build_type)
+ product_dir = os.path.join(cmd_helper.OutDirectory.get(),
+ constants.GetBuildType())
assert os.path.isabs(product_dir)
if os.path.isdir(constants.ISOLATE_DEPS_DIR):
@@ -142,7 +142,8 @@ def _GenerateDepsDirUsingIsolate(suite_name, build_type):
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', build_type)
+ deps_product_dir = os.path.join(constants.ISOLATE_DEPS_DIR, 'out',
+ 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)
@@ -270,19 +271,17 @@ def Setup(test_options):
if not ports.ResetTestServerPortAllocation():
raise Exception('Failed to reset test server port.')
- test_package = test_package_apk.TestPackageApk(test_options.suite_name,
- test_options.build_type)
+ test_package = test_package_apk.TestPackageApk(test_options.suite_name)
if not os.path.exists(test_package.suite_path):
test_package = test_package_exe.TestPackageExecutable(
- test_options.suite_name, test_options.build_type)
+ test_options.suite_name)
if not os.path.exists(test_package.suite_path):
raise Exception(
'Did not find %s target. Ensure it has been built.'
% test_options.suite_name)
logging.warning('Found target %s', test_package.suite_path)
- _GenerateDepsDirUsingIsolate(test_options.suite_name,
- test_options.build_type)
+ _GenerateDepsDirUsingIsolate(test_options.suite_name)
# Constructs a new TestRunner with the current options.
def TestRunnerFactory(device, shard_index):

Powered by Google App Engine
This is Rietveld 408576698