From 23d6b0abd031f79e653dc3b323b98b4fc777ddbd Mon Sep 17 00:00:00 2001 From: "gkanwar@chromium.org" Date: Thu, 8 Aug 2013 00:59:01 +0000 Subject: [PATCH] Removes unused and deprecated flags in test_runner.py Flags: * --profiler * --install_apk (-I) * --disable_assertions NOTRY=True BUG= Review URL: https://chromiumcodereview.appspot.com/22622004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216338 0039d316-1c4b-4281-b951-d872f2087c98 --- .../pylib/instrumentation/test_options.py | 1 - .../android/pylib/instrumentation/test_runner.py | 3 +-- build/android/pylib/uiautomator/test_options.py | 1 - build/android/pylib/uiautomator/test_runner.py | 1 - build/android/test_runner.py | 16 ---------------- 5 files changed, 1 insertion(+), 21 deletions(-) diff --git a/build/android/pylib/instrumentation/test_options.py b/build/android/pylib/instrumentation/test_options.py index fec3d9c832a4a2..0c9ac005baec24 100644 --- a/build/android/pylib/instrumentation/test_options.py +++ b/build/android/pylib/instrumentation/test_options.py @@ -17,7 +17,6 @@ 'test_data', 'save_perf_json', 'screenshot_failures', - 'disable_assertions', 'wait_for_debugger', 'test_apk', 'test_apk_path', diff --git a/build/android/pylib/instrumentation/test_runner.py b/build/android/pylib/instrumentation/test_runner.py index 4464d72d3dd65c..5e2b67ece86160 100644 --- a/build/android/pylib/instrumentation/test_runner.py +++ b/build/android/pylib/instrumentation/test_runner.py @@ -126,8 +126,7 @@ def SetUp(self): logging.warning('Unable to enable java asserts for %s, non rooted device', self.device) else: - if self.adb.SetJavaAssertsEnabled( - enable=not self.options.disable_assertions): + if self.adb.SetJavaAssertsEnabled(True): self.adb.Reboot(full_reboot=False) # We give different default value to launch HTTP server based on shard index diff --git a/build/android/pylib/uiautomator/test_options.py b/build/android/pylib/uiautomator/test_options.py index ddc2ae0fa30100..2ce5eb00805e07 100644 --- a/build/android/pylib/uiautomator/test_options.py +++ b/build/android/pylib/uiautomator/test_options.py @@ -17,7 +17,6 @@ 'test_data', 'save_perf_json', 'screenshot_failures', - 'disable_assertions', 'uiautomator_jar', 'uiautomator_info_jar', 'package_name']) diff --git a/build/android/pylib/uiautomator/test_runner.py b/build/android/pylib/uiautomator/test_runner.py index 74e887deadc14b..58cdd45dd0a0c8 100644 --- a/build/android/pylib/uiautomator/test_runner.py +++ b/build/android/pylib/uiautomator/test_runner.py @@ -35,7 +35,6 @@ def __init__(self, test_options, device, shard_index, test_pkg, test_options.test_data, test_options.save_perf_json, test_options.screenshot_failures, - test_options.disable_assertions, wait_for_debugger=False, test_apk=None, test_apk_path=None, diff --git a/build/android/test_runner.py b/build/android/test_runner.py index 4113158fd38235..b8de366a40ec79 100755 --- a/build/android/test_runner.py +++ b/build/android/test_runner.py @@ -68,13 +68,6 @@ def AddCommonOptions(option_parser): default=0, action='count', help='Verbose level (multiple times for more)') - profilers = ['devicestatsmonitor', 'chrometrace', 'dumpheap', 'smaps', - 'traceview'] - option_parser.add_option('--profiler', dest='profilers', action='append', - choices=profilers, - help=('Profiling tool to run during test. Pass ' - 'multiple times to run multiple profilers. ' - 'Available profilers: %s' % profilers)) option_parser.add_option('--tool', dest='tool', help=('Run the test under a tool ' @@ -172,10 +165,6 @@ def AddJavaTestOptions(option_parser): 'kept. When this is run via a sharder ' 'the test server ports should be kept and ' 'should not be reset.')) - # TODO(gkanwar): This option is deprecated. Remove it in the future. - option_parser.add_option('--disable_assertions', action='store_true', - help=('(DEPRECATED) Run with java assertions ' - 'disabled.')) option_parser.add_option('--test_data', action='append', default=[], help=('Each instance defines a directory of test ' 'data that should be copied to the target(s) ' @@ -228,9 +217,6 @@ def AddInstrumentationTestOptions(option_parser): option_parser.add_option('-w', '--wait_debugger', dest='wait_for_debugger', action='store_true', help='Wait for debugger.') - #TODO(craigdh): Remove option once -I is no longer passed downstream. - option_parser.add_option('-I', dest='install_apk', action='store_true', - help='(DEPRECATED) Install the test apk.') option_parser.add_option( '--test-apk', dest='test_apk', help=('The name of the apk containing the tests ' @@ -293,7 +279,6 @@ def ProcessInstrumentationOptions(options, error_func): options.test_data, options.save_perf_json, options.screenshot_failures, - options.disable_assertions, options.wait_for_debugger, options.test_apk, options.test_apk_path, @@ -363,7 +348,6 @@ def ProcessUIAutomatorOptions(options, error_func): options.test_data, options.save_perf_json, options.screenshot_failures, - options.disable_assertions, options.uiautomator_jar, options.uiautomator_info_jar, options.package_name)