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

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

Issue 1854233002: Reland 2 of GN: Make breakpad_unittests & sandbox_linux_unittests use test() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test-minor-renames
Patch Set: Fix PIE errors, fix component mode. 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
Index: build/android/pylib/gtest/gtest_test_instance.py
diff --git a/build/android/pylib/gtest/gtest_test_instance.py b/build/android/pylib/gtest/gtest_test_instance.py
index f5b2c69ada928275590ee80b504ddd45e731baef..32911168e14b3dbfe5b57104720b305cb0de82fb 100644
--- a/build/android/pylib/gtest/gtest_test_instance.py
+++ b/build/android/pylib/gtest/gtest_test_instance.py
@@ -144,9 +144,18 @@ class GtestTestInstance(test_instance.TestInstance):
self._shard_timeout = args.shard_timeout
self._skip_clear_data = args.skip_clear_data
self._suite = args.suite_name[0]
+ self._exe_dist_dir = None
- self._exe_path = os.path.join(constants.GetOutDirectory(),
- self._suite)
+ # GYP:
+ if args.executable_dist_dir:
+ self._exe_dist_dir = os.path.abspath(args.executable_dist_dir)
+ else:
+ # TODO(agrieve): Remove auto-detection once recipes pass flag explicitly.
+ exe_dist_dir = os.path.join(constants.GetOutDirectory(),
+ '%s__dist' % self._suite)
+
+ if os.path.exists(exe_dist_dir):
+ self._exe_dist_dir = exe_dist_dir
incremental_part = ''
if args.test_apk_incremental_install_script:
@@ -171,9 +180,7 @@ class GtestTestInstance(test_instance.TestInstance):
self._extras[EXTRA_SHARD_NANO_TIMEOUT] = int(1e9 * self._shard_timeout)
self._shard_timeout = 900
- if not os.path.exists(self._exe_path):
- self._exe_path = None
- if not self._apk_helper and not self._exe_path:
+ if not self._apk_helper and not self._exe_dist_dir:
error_func('Could not find apk or executable for %s' % self._suite)
self._data_deps = []
@@ -234,8 +241,8 @@ class GtestTestInstance(test_instance.TestInstance):
return self._app_data_files
@property
- def exe(self):
- return self._exe_path
+ def exe_dist_dir(self):
+ return self._exe_dist_dir
@property
def extras(self):
« no previous file with comments | « build/android/native_app_dependencies.gypi ('k') | build/android/pylib/local/device/local_device_gtest_run.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698