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

Unified Diff: build/android/pylib/instrumentation/instrumentation_test_instance.py

Issue 2294843002: [Android] Fix a few more symlink issues in test_runner.py. (Closed)
Patch Set: prereview: remove leftover pdb tracepoint Created 4 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
« no previous file with comments | « build/android/pylib/gtest/gtest_test_instance.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/instrumentation/instrumentation_test_instance.py
diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance.py b/build/android/pylib/instrumentation/instrumentation_test_instance.py
index 78583e4b06c499e1ffadfa9d63dd51d26dc33930..c98686a055c0a170d53a35a8ea79df4e9deec0f8 100644
--- a/build/android/pylib/instrumentation/instrumentation_test_instance.py
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py
@@ -406,6 +406,10 @@ class InstrumentationTestInstance(test_instance.TestInstance):
constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR,
'%s.apk' % args.apk_under_test)
+ # TODO(jbudorick): Move the realpath up to the argument parser once
+ # APK-by-name is no longer supported.
+ apk_under_test_path = os.path.realpath(apk_under_test_path)
+
if not os.path.exists(apk_under_test_path):
error_func('Unable to find APK under test: %s' % apk_under_test_path)
@@ -413,12 +417,22 @@ class InstrumentationTestInstance(test_instance.TestInstance):
if args.test_apk.endswith('.apk'):
self._suite = os.path.splitext(os.path.basename(args.test_apk))[0]
+ test_apk_path = args.test_apk
self._test_apk = apk_helper.ToHelper(args.test_apk)
else:
self._suite = args.test_apk
- self._test_apk = apk_helper.ToHelper(os.path.join(
+ test_apk_path = os.path.join(
constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR,
- '%s.apk' % args.test_apk))
+ '%s.apk' % args.test_apk)
+
+ # TODO(jbudorick): Move the realpath up to the argument parser once
+ # APK-by-name is no longer supported.
+ test_apk_path = os.path.realpath(test_apk_path)
+
+ if not os.path.exists(test_apk_path):
+ error_func('Unable to find test APK: %s' % test_apk_path)
+
+ self._test_apk = apk_helper.ToHelper(test_apk_path)
self._apk_under_test_incremental_install_script = (
args.apk_under_test_incremental_install_script)
« no previous file with comments | « build/android/pylib/gtest/gtest_test_instance.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698