summaryrefslogtreecommitdiffstats
path: root/chrome/test/chromeos
diff options
context:
space:
mode:
authordennisjeffrey@chromium.org <dennisjeffrey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-15 01:15:15 +0000
committerdennisjeffrey@chromium.org <dennisjeffrey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-15 01:15:15 +0000
commitdeef80c3e13afea9a86f56103a7721e6a08b2775 (patch)
treecb27bb30d552bee7ac97369bd1e36e78533af4c0 /chrome/test/chromeos
parent413a6fd5ffc8a1562e892027a3dca17e9c7099ce (diff)
downloadchromium_src-deef80c3e13afea9a86f56103a7721e6a08b2775.zip
chromium_src-deef80c3e13afea9a86f56103a7721e6a08b2775.tar.gz
chromium_src-deef80c3e13afea9a86f56103a7721e6a08b2775.tar.bz2
Modify how input arguments are processed in pyauto autotest desktopui_PyAutoPerfTests.
Input arguments passed to autotest desktopui_PyAutoPerfTests are now stripped of leading/trailing quotes if they exist. Also changed the name of option 'num_iterations' to just 'iterations'. BUG=None TEST=None Review URL: http://codereview.chromium.org/7890058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101212 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/chromeos')
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py
index 73d322d..4d9e9fb 100644
--- a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py
@@ -67,11 +67,15 @@ class desktopui_PyAutoPerfTests(chrome_test.ChromeTestBase):
def parse_args(self, args):
"""Parses input arguments to this autotest."""
parser = optparse.OptionParser()
- parser.add_option('-i', '--num_iterations', dest='num_iterations',
- type='int', default=0,
+ parser.add_option('--iterations', dest='num_iterations', type='int',
+ default=0,
help='Number of iterations for perf measurements. '
'Defaults to the value given in perf.py.')
- return parser.parse_args(args)
+ # Preprocess the args to remove quotes before/after each one if they
+ # exist. This is necessary because arguments passed via
+ # run_remote_tests.sh may be individually quoted, and those quotes must
+ # be stripped before they are parsed.
+ return parser.parse_args(map(lambda arg: arg.strip('\'\"'), args))
def run_once(self, args=[]):
"""Runs the PyAuto performance tests."""