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

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

Issue 10809017: Android: Fix one issue for instrumentation on "user" devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/android_commands.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/run_java_tests.py
diff --git a/build/android/pylib/run_java_tests.py b/build/android/pylib/run_java_tests.py
index 598a56a746f412d29bef1545f30f24ad6737a075..ddf38fe4dfa007792dedb50ddbbe4fbd82db88c5 100644
--- a/build/android/pylib/run_java_tests.py
+++ b/build/android/pylib/run_java_tests.py
@@ -248,8 +248,12 @@ class TestRunner(BaseTestRunner):
def SetUp(self):
"""Sets up the test harness and device before all tests are run."""
super(TestRunner, self).SetUp()
- if self.adb.SetJavaAssertsEnabled(enable=True):
- self.adb.Reboot(full_reboot=False)
+ if not self.adb.IsRootEnabled():
+ logging.warning('Unable to enable java asserts for %s, non rooted device',
+ self.device)
+ else:
+ if self.adb.SetJavaAssertsEnabled(enable=True):
+ self.adb.Reboot(full_reboot=False)
# We give different default value to launch HTTP server based on shard index
# because it may have race condition when multiple processes are trying to
« no previous file with comments | « build/android/pylib/android_commands.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698