| 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
|
|
|