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

Unified Diff: devil/devil/android/device_utils.py

Issue 2552033003: [devil] Clarify DeviceUtils.Install{,SplitApk} failure on missing APK. (Closed)
Patch Set: Created 4 years 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 | devil/devil/android/device_utils_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: devil/devil/android/device_utils.py
diff --git a/devil/devil/android/device_utils.py b/devil/devil/android/device_utils.py
index 427fbb50bade1aa30270b82832b5a40ee3419bc5..36a5317316dba029ce1e77f70423c9f1f7fc994e 100644
--- a/devil/devil/android/device_utils.py
+++ b/devil/devil/android/device_utils.py
@@ -16,6 +16,7 @@ import logging
import multiprocessing
import os
import posixpath
+import pprint
import re
import shutil
import stat
@@ -701,6 +702,12 @@ class DeviceUtils(object):
if len(all_apks) == 1:
logger.warning('split-select did not select any from %s', split_apks)
+ missing_apks = [apk for apk in all_apks if not os.path.exists(apk)]
+ if missing_apks:
+ raise device_errors.CommandFailedError(
+ 'Attempted to install non-existent apks: %s'
+ % pprint.pformat(missing_apks))
+
package_name = base_apk.GetPackageName()
device_apk_paths = self._GetApplicationPathsInternal(package_name)
« no previous file with comments | « no previous file | devil/devil/android/device_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698