0

[Android] Remove --test-arguments arg from test_runner.py.

Deprecated in favor of passing such arguments to test_runner.py
directly.

BUG=700366

Review-Url: https://codereview.chromium.org/2855483003
Cr-Commit-Position: refs/heads/master@{#471096}
This commit is contained in:
jbudorick
2017-05-11 15:38:43 -07:00
committed by Commit bot
parent 2389662b9f
commit 6a94be3b51
5 changed files with 3 additions and 29 deletions

@@ -349,8 +349,6 @@ class GtestTestInstance(test_instance.TestInstance):
self._flags.extend(flag for flag in stripped_lines if flag)
if args.run_disabled:
self._flags.append('--gtest_also_run_disabled_tests')
if args.test_arguments:
self._flags.extend(args.test_arguments.split())
@property
def activity(self):

@@ -654,13 +654,6 @@ class InstrumentationTestInstance(test_instance.TestInstance):
if args.regenerate_goldens:
self._flags.append('--regenerate-goldens')
if args.test_arguments:
# --test-arguments is deprecated for gtests and is in the process of
# being removed.
raise Exception(
'--test-arguments is not supported for instrumentation '
'tests. Pass command-line flags directly instead.')
def _initializeDriverAttributes(self):
self._driver_apk = os.path.join(
constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR,

@@ -47,15 +47,14 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
'device_flags_file',
'strict_mode',
'regenerate_goldens',
'test_arguments',
])
def createFlagAttributesArgs(
self, command_line_flags=None, device_flags_file=None,
strict_mode=None, regenerate_goldens=None, test_arguments=None):
strict_mode=None, regenerate_goldens=None):
return self._FlagAttributesArgs(
command_line_flags, device_flags_file, strict_mode,
regenerate_goldens, test_arguments)
regenerate_goldens)
def test_initializeFlagAttributes_commandLineFlags(self):
o = self.createTestInstance()
@@ -92,12 +91,6 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
self.assertEquals(
o._flags, ['--enable-test-intents', '--regenerate-goldens'])
def test_initializeFlagAttributes_testArgumentsRaisesException(self):
o = self.createTestInstance()
args = self.createFlagAttributesArgs(test_arguments='--foo --bar')
with self.assertRaises(Exception):
o._initializeFlagAttributes(args)
def testGetTests_noFilter(self):
o = self.createTestInstance()
raw_tests = [

@@ -84,12 +84,6 @@ def AddCommandLineOptions(parser):
type=os.path.realpath,
help='The relative filepath to a file containing '
'command-line flags to set on the device')
# TODO(jbudorick): This is deprecated. Remove once clients have switched
# to passing command-line flags directly.
parser.add_argument(
'-a', '--test-arguments',
dest='test_arguments', default='',
help=argparse.SUPPRESS)
parser.set_defaults(allow_unknown=True)
parser.set_defaults(command_line_flags=None)
@@ -431,10 +425,6 @@ def AddInstrumentationTestOptions(parser):
'--timeout-scale',
type=float,
help='Factor by which timeouts should be scaled.')
parser.add_argument(
'-w', '--wait_debugger',
action='store_true', dest='wait_for_debugger',
help='Wait for debugger.')
# These arguments are suppressed from the help text because they should
# only ever be specified by an intermediate script.

@@ -237,7 +237,7 @@ output a message.
To run unit tests use the following command:
```shell
out/Debug/bin/run_test_name -f <test_filter_if_any> --test-arguments=--wait-for-debugger -t 6000
out/Debug/bin/run_test_name -f <test_filter_if_any> --wait-for-debugger -t 6000
```
That command will cause the test process to wait until a debugger is attached.