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 fc0a13fd8120323d9f31ff0fef78105fae49cb4d..7c7d11f6db15553b755f035874720bc3a1f9e702 100644 |
--- a/build/android/pylib/run_java_tests.py |
+++ b/build/android/pylib/run_java_tests.py |
@@ -95,6 +95,7 @@ class TestRunner(BaseTestRunner): |
- screenshot_failures: Take a screenshot for a test failure |
- tool: Name of the Valgrind tool. |
- wait_for_debugger: blocks until the debugger is connected. |
+ - disable_assertions: Whether to disable java assertions on the device. |
device: Attached android device. |
tests_iter: A list of tests to be run. |
coverage: Collects coverage information if opted. |
@@ -120,6 +121,7 @@ class TestRunner(BaseTestRunner): |
self.save_perf_json = options.save_perf_json |
self.screenshot_failures = options.screenshot_failures |
self.wait_for_debugger = options.wait_for_debugger |
+ self.disable_assertions = options.disable_assertions |
self.tests_iter = tests_iter |
self.coverage = coverage |
@@ -262,7 +264,7 @@ class TestRunner(BaseTestRunner): |
logging.warning('Unable to enable java asserts for %s, non rooted device', |
self.device) |
else: |
- if self.adb.SetJavaAssertsEnabled(enable=True): |
+ if self.adb.SetJavaAssertsEnabled(enable=not self.disable_assertions): |
self.adb.Reboot(full_reboot=False) |
# We give different default value to launch HTTP server based on shard index |