diff options
author | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-23 08:01:17 +0000 |
---|---|---|
committer | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-23 08:01:17 +0000 |
commit | cbac584ca18858b6dfe2de872f6bd3b138acc08c (patch) | |
tree | 631b725344aca42864b649ccacff0e557e3faec0 /chrome | |
parent | caa741b74149e494d1409d1b147f99cd42eab228 (diff) | |
download | chromium_src-cbac584ca18858b6dfe2de872f6bd3b138acc08c.zip chromium_src-cbac584ca18858b6dfe2de872f6bd3b138acc08c.tar.gz chromium_src-cbac584ca18858b6dfe2de872f6bd3b138acc08c.tar.bz2 |
Add --repeat flag to PyAuto tests. This is useful for firing off the tests
many times to determine flakiness.
Review URL: http://codereview.chromium.org/1759004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45426 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/test/pyautolib/pyauto.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py index 9e848c6..164e3e9 100644 --- a/chrome/test/pyautolib/pyauto.py +++ b/chrome/test/pyautolib/pyauto.py @@ -296,6 +296,10 @@ class Main(object): parser.add_option( '', '--list-missing-tests', action='store_true', default=False, help='Print a list of tests not included in PYAUTO_TESTS, and exit') + parser.add_option( + '', '--repeat', type='int', default=1, + help='Number of times to repeat the tests. Useful to determine ' + 'flakiness. Defaults to 1.') self._options, self._args = parser.parse_args() @@ -378,6 +382,7 @@ class Main(object): logging.warn("%s missing. Cannot load tests." % pyauto_tests_file) else: args = self._GetTestNamesFrom(pyauto_tests_file) + args = args * self._options.repeat logging.debug("Loading tests from %s", args) loaded_tests = unittest.defaultTestLoader.loadTestsFromNames(args) return loaded_tests |