diff options
author | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-17 23:48:14 +0000 |
---|---|---|
committer | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-17 23:48:14 +0000 |
commit | 05a9baf1579ee7a2bab1d914d14c494e7e211eda (patch) | |
tree | 93b5ec0e68276c7efaeae8e95ee1b0687c877725 /chrome | |
parent | 050ca6425e4997dfe1baffb1c2f5dc59821e2b83 (diff) | |
download | chromium_src-05a9baf1579ee7a2bab1d914d14c494e7e211eda.zip chromium_src-05a9baf1579ee7a2bab1d914d14c494e7e211eda.tar.gz chromium_src-05a9baf1579ee7a2bab1d914d14c494e7e211eda.tar.bz2 |
PyAuto: fix extra flags passed to chrome
1. Fix so that extra flags passed actually get passed on to chrome
2. Make it easier (get rid of --ui-test-flags option since it was cumbersome)
Now, extra options can be passed like:
python mytest.py --chrome-flags="--enable-crash-reporter"
Still need a way for an individual TestCase to be able to add flags, without
being provided from the command line.
Review URL: http://codereview.chromium.org/2833015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50170 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/test/pyautolib/pyauto.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py index 3ef206c..c734bee 100644 --- a/chrome/test/pyautolib/pyauto.py +++ b/chrome/test/pyautolib/pyauto.py @@ -667,8 +667,11 @@ class Main(object): '-D', '--wait-for-debugger', action='store_true', default=False, help='Block PyAuto on startup for attaching debugger.') parser.add_option( - '', '--ui-test-flags', type='string', default='', - help='Flags passed to the UI test suite. Refer ui_test.h for options') + '', '--chrome-flags', type='string', default='', + help='Flags passed to Chrome. This is in addition to the usual flags ' + 'like suppressing first-run dialogs, enabling automation. ' + 'See chrome/common/chrome_switches.cc for the list of flags ' + 'chrome understands.') parser.add_option( '', '--list-missing-tests', action='store_true', default=False, help='Print a list of tests not included in PYAUTO_TESTS, and exit') @@ -830,7 +833,10 @@ class Main(object): if self._options.wait_for_debugger: raw_input('Attach debugger to process %s and hit <enter> ' % os.getpid()) - pyauto_suite = PyUITestSuite(re.split('\s+', self._options.ui_test_flags)) + suite_args = [sys.argv[0]] + if self._options.chrome_flags: + suite_args.append('--extra-chrome-flags=' + self._options.chrome_flags) + pyauto_suite = PyUITestSuite(suite_args) loaded_tests = self._LoadTests(self._args) pyauto_suite.addTests(loaded_tests) verbosity = 1 |