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

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

Issue 11759012: [Android] Move GTest options to test_options_parser.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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
Index: build/android/pylib/utils/test_options_parser.py
diff --git a/build/android/pylib/test_options_parser.py b/build/android/pylib/utils/test_options_parser.py
similarity index 75%
rename from build/android/pylib/test_options_parser.py
rename to build/android/pylib/utils/test_options_parser.py
index 93382645c366a44d1de9cd82f0fef693f5933e60..f9917d9e9eec975a187e6f8c07c279bb7ccabc15 100644
--- a/build/android/pylib/test_options_parser.py
+++ b/build/android/pylib/utils/test_options_parser.py
@@ -4,7 +4,8 @@
"""Parses options for the instrumentation tests."""
-import constants
+from pylib import constants
klundberg 2013/01/03 21:04:07 Does it make sense to move constants too? I don't
craigdh 2013/01/03 21:13:12 I don't like it either, but constants.py is used i
+
import optparse
import os
import sys
@@ -80,6 +81,57 @@ def AddTestRunnerOptions(option_parser, default_timeout=60):
AddBuildTypeOption(option_parser)
+def AddGTestOptions(option_parser):
frankf 2013/01/03 21:17:23 So the reason the other options are here, is that
craigdh 2013/01/03 21:44:05 Improving consistency between the various test run
+ """Decorates OptionParser with GTest tests options."""
+
+ AddTestRunnerOptions(option_parser, default_timeout=0)
+ option_parser.add_option('-s', '--suite', dest='test_suite',
+ help='Executable name of the test suite to run '
+ '(use -s help to list them)')
klundberg 2013/01/03 21:04:07 nit: period at end of sentence.
craigdh 2013/01/03 21:44:05 Done.
+ option_parser.add_option('--out-directory', dest='out_directory',
+ help='Path to the out/ directory, irrespective of '
+ 'the build type. Only for non-Chromium uses.')
+ option_parser.add_option('-d', '--device', dest='test_device',
+ help='Target device the test suite to run ')
klundberg 2013/01/03 21:04:07 Seems like something is missing in this sentence.
craigdh 2013/01/03 21:44:05 Done.
+ option_parser.add_option('-f', '--gtest_filter', dest='gtest_filter',
+ help='gtest filter')
klundberg 2013/01/03 21:04:07 nit: period at end of sentence.
craigdh 2013/01/03 21:44:05 Done.
craigdh 2013/01/03 21:44:05 Done.
+ option_parser.add_option('-a', '--test_arguments', dest='test_arguments',
+ help='Additional arguments to pass to the test')
klundberg 2013/01/03 21:04:07 nit: period at end of sentence.
craigdh 2013/01/03 21:44:05 Done.
+ option_parser.add_option('-L', dest='log_dump',
+ help='file name of log dump, which will be put in '
klundberg 2013/01/03 21:04:07 file/File
craigdh 2013/01/03 21:44:05 Done.
+ 'subfolder debug_info_dumps under the same '
+ 'directory in where the test_suite exists.')
+ option_parser.add_option('-e', '--emulator', dest='use_emulator',
+ action='store_true',
+ help='Run tests in a new instance of emulator')
klundberg 2013/01/03 21:04:07 nit: period at end of sentence.
craigdh 2013/01/03 21:44:05 Done.
+ option_parser.add_option('-n', '--emulator_count',
frankf 2013/01/03 21:17:23 For reference: at some point (not in this CL), it'
craigdh 2013/01/03 21:44:05 Added a TODO.
+ type='int', default=1,
+ help='Number of emulators to launch for running the '
+ 'tests.')
+ option_parser.add_option('-x', '--xvfb', dest='use_xvfb',
+ action='store_true',
+ help='Use Xvfb around tests (ignored if not Linux)')
klundberg 2013/01/03 21:04:07 nit: period at end of sentence.
craigdh 2013/01/03 21:44:05 Done.
+ option_parser.add_option('--webkit', action='store_true',
+ help='Run the tests from a WebKit checkout.')
+ option_parser.add_option('--fast', '--fast_and_loose', dest='fast_and_loose',
+ action='store_true',
+ help='Go faster (but be less stable), '
+ 'for quick testing. Example: when tracking down '
+ 'tests that hang to add to the disabled list, '
+ 'there is no need to redeploy the test binary '
+ 'or data to the device again. '
+ 'Don\'t use on bots by default!')
+ option_parser.add_option('--repeat', dest='repeat', type='int',
+ default=2,
+ help='Repeat count on test timeout')
klundberg 2013/01/03 21:04:07 nit: period at end of sentence.
craigdh 2013/01/03 21:44:05 Done.
+ option_parser.add_option('--exit_code', action='store_true',
+ help='If set, the exit code will be total number '
+ 'of failures.')
+ option_parser.add_option('--exe', action='store_true',
+ help='If set, use the exe test runner instead of '
+ 'the APK.')
+
+
def AddInstrumentationOptions(option_parser):
"""Decorates OptionParser with instrumentation tests options."""

Powered by Google App Engine
This is Rietveld 408576698