summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorgkanwar@google.com <gkanwar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-12 23:22:57 +0000
committergkanwar@google.com <gkanwar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-12 23:22:57 +0000
commitd82f025443fe78b8c0a6d41d74bda8d6b0a888c2 (patch)
treee233061efc4ba3b71ce96e9f202127b3cd3b38b5 /build
parent8d14e56b8923cc1d10d940f891726ec530a9bde7 (diff)
downloadchromium_src-d82f025443fe78b8c0a6d41d74bda8d6b0a888c2.zip
chromium_src-d82f025443fe78b8c0a6d41d74bda8d6b0a888c2.tar.gz
chromium_src-d82f025443fe78b8c0a6d41d74bda8d6b0a888c2.tar.bz2
Adds errors on extra positional args
BUG=259651 Review URL: https://chromiumcodereview.appspot.com/18617003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211478 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-xbuild/android/test_runner.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/build/android/test_runner.py b/build/android/test_runner.py
index 08a0be3..08bd416 100755
--- a/build/android/test_runner.py
+++ b/build/android/test_runner.py
@@ -369,6 +369,11 @@ def RunTestsCommand(command, options, args, option_parser):
individual test runner.
"""
+ # Check for extra arguments
+ if len(args) > 2:
+ option_parser.error('Unrecognized arguments: %s' % (' '.join(args[2:])))
+ return constants.ERROR_EXIT_CODE
+
ProcessCommonOptions(options)
if command == 'gtest':
@@ -443,6 +448,10 @@ def HelpCommand(command, options, args, option_parser):
if len(args) < 3:
option_parser.print_help()
return 0
+ # If we have too many args, print an error
+ if len(args) > 3:
+ option_parser.error('Unrecognized arguments: %s' % (' '.join(args[3:])))
+ return constants.ERROR_EXIT_CODE
command = args[2]