Chromium Code Reviews| 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..6363588df7763ef29eb649e736e5e48c539649f1 100644 |
| --- a/build/android/pylib/gtest/gtest_test_instance.py |
| +++ b/build/android/pylib/gtest/gtest_test_instance.py |
| @@ -144,9 +144,27 @@ 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_path = args.executable_path |
| - self._exe_path = os.path.join(constants.GetOutDirectory(), |
| - self._suite) |
| + # GYP: |
| + if args.executable_path: |
| + self._exe_path = os.path.abspath(args.executable_path) |
| + else: |
| + # TODO(agrieve): Remove hardcoding after recipes are updated. |
|
jbudorick
2016/03/30 19:33:38
:( :( :(
I would prefer that we add --executable-
agrieve
2016/03/30 19:52:57
I did add --executable-path, and do use it when pr
jbudorick
2016/03/30 19:55:21
I mean that I'd prefer adding it separately from t
|
| + if self._suite == 'sandbox_linux_unittests': |
| + exe_path = os.path.join(constants.GetOutDirectory(), 'obj', 'sandbox', |
| + 'linux', 'sandbox_linux_unittests', |
| + 'sandbox_linux_unittests') |
| + elif self._suite == 'breakpad_unittests': |
| + exe_path = os.path.join(constants.GetOutDirectory(), 'obj', 'breakpad', |
| + 'breakpad_unittests', 'breakpad_unittests') |
| + if os.path.exists(exe_path): |
| + self._exe_path = exe_path |
| + else: |
| + # GYP location: |
| + exe_path = os.path.join(constants.GetOutDirectory(), self._suite) |
| + if os.path.exists(exe_path): |
| + self._exe_path = exe_path |
| incremental_part = '' |
| if args.test_apk_incremental_install_script: |
| @@ -171,8 +189,6 @@ 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: |
| error_func('Could not find apk or executable for %s' % self._suite) |