Add an option for disabling java assertions.
BUG=153837 Review URL: https://codereview.chromium.org/11093009 git-svn-id: http://src.chromium.org/svn/trunk/src/build@165212 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
323a4e8249
Коммит
8457e74561
|
@ -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
|
||||
|
|
|
@ -124,6 +124,8 @@ def AddInstrumentationOptions(option_parser):
|
|||
help=('If present, will set the buildbot status '
|
||||
'as STEP_FAILURE, otherwise as STEP_WARNINGS '
|
||||
'when test(s) fail.'))
|
||||
option_parser.add_option('--disable_assertions', action='store_true',
|
||||
help='Run with java assertions disabled.')
|
||||
|
||||
|
||||
def ValidateInstrumentationOptions(option_parser, options, args):
|
||||
|
|
Загрузка…
Ссылка в новой задаче