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

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

Issue 338353004: [Android] Switch KillAll, StartActivity, and BroadcastIntent to DeviceUtils. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: appeasing windows Created 6 years, 6 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/test_package_apk.py ('k') | build/android/pylib/linker/test_case.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/gtest/test_package_exe.py
diff --git a/build/android/pylib/gtest/test_package_exe.py b/build/android/pylib/gtest/test_package_exe.py
index 252c4a4f08b76562cc8c1160cddfa8617ecb3e94..a7f6030739149b746f142321856aecb511fcdf78 100644
--- a/build/android/pylib/gtest/test_package_exe.py
+++ b/build/android/pylib/gtest/test_package_exe.py
@@ -77,7 +77,15 @@ class TestPackageExecutable(TestPackage):
#override
def ClearApplicationState(self, device):
- device.old_interface.KillAllBlocking(self.suite_name, 30)
+ try:
+ # We don't expect the executable to be running, so we don't attempt
+ # to retry on failure.
+ device.KillAll(self.suite_name, blocking=True, timeout=30, retries=0)
+ except device_errors.CommandFailedError:
+ # KillAll raises an exception if it can't find a process with the given
+ # name. We only care that there is no process with the given name, so
+ # we can safely eat the exception.
+ pass
#override
def CreateCommandLineFileOnDevice(self, device, test_filter, test_arguments):
« no previous file with comments | « build/android/pylib/gtest/test_package_apk.py ('k') | build/android/pylib/linker/test_case.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698