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

Unified Diff: build/android/pylib/valgrind_tools.py

Issue 285143002: [Android] Convert to DeviceUtils versions of IsOnline, HasRoot, and EnableRoot. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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/utils/test_environment.py ('k') | tools/android/mempressure.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/valgrind_tools.py
diff --git a/build/android/pylib/valgrind_tools.py b/build/android/pylib/valgrind_tools.py
index 22ac39b4ba2247a76e25e93fdfcde3dcbba4185d..344a9037dc666992017e128746e054ac0ed25fc5 100644
--- a/build/android/pylib/valgrind_tools.py
+++ b/build/android/pylib/valgrind_tools.py
@@ -23,11 +23,13 @@ Call tool.CleanUpEnvironment().
# pylint: disable=R0201
import glob
+import logging
import os.path
import subprocess
import sys
from pylib.constants import DIR_SOURCE_ROOT
+from pylib.device import device_errors
def SetChromeTimeoutScale(device, scale):
@@ -132,7 +134,13 @@ class AddressSanitizerTool(BaseTool):
return self.GetTestWrapper()
def SetupEnvironment(self):
- self._device.old_interface.EnableAdbRoot()
+ try:
+ self._device.EnableRoot()
+ except device_errors.CommandFailedError as e:
+ # Try to set the timeout scale anyway.
+ # TODO(jbudorick) Handle this exception appropriately after interface
+ # conversions are finished.
+ logging.error(str(e))
SetChromeTimeoutScale(self._device, self.GetTimeoutScale())
def CleanUpEnvironment(self):
« no previous file with comments | « build/android/pylib/utils/test_environment.py ('k') | tools/android/mempressure.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698