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

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

Issue 11093009: Add an option for disabling java assertions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 2 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 | « no previous file | build/android/pylib/test_options_parser.py » ('j') | 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 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
« no previous file with comments | « no previous file | build/android/pylib/test_options_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698