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

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

Issue 10928240: Fix ValidateInstrumentationOptions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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/run_instrumentation_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/test_options_parser.py
diff --git a/build/android/pylib/test_options_parser.py b/build/android/pylib/test_options_parser.py
index f082274d39bb76c19aeb5e445f30ff0ff20aeb63..8492ec3b3c9a0772bf4754840450a9a90cc80471 100644
--- a/build/android/pylib/test_options_parser.py
+++ b/build/android/pylib/test_options_parser.py
@@ -7,6 +7,7 @@
import constants
import optparse
import os
+import sys
_SDK_OUT_DIR = os.path.join(constants.CHROME_DIR, 'out')
@@ -102,13 +103,14 @@ def AddInstrumentationOptions(option_parser):
option_parser.add_option('--python_test_root',
help='Root of the python-driven tests.')
-def ValidateInstrumentationOptions(options, args):
+def ValidateInstrumentationOptions(option_parser, options, args):
"""Validate options/arguments and populate options with defaults."""
if len(args) > 1:
- option_parser.error('Unknown argument:', args[1:])
+ option_parser.print_help(sys.stderr)
+ option_parser.error('Unknown arguments: %s' % args[1:])
if options.java_only and options.python_only:
option_parser.error('Options java_only (-j) and python_only (-p) '
- 'are mutually exclusive')
+ 'are mutually exclusive.')
options.run_java_tests = True
options.run_python_tests = True
@@ -130,4 +132,3 @@ def ValidateInstrumentationOptions(options, args):
options.annotation = []
else:
options.annotation = ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest']
-
« no previous file with comments | « no previous file | build/android/run_instrumentation_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698