diff options
author | dennisjeffrey@chromium.org <dennisjeffrey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-03 00:34:30 +0000 |
---|---|---|
committer | dennisjeffrey@chromium.org <dennisjeffrey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-03 00:34:30 +0000 |
commit | 4f337ee6eafb0af5d5b30051cbbf2ff725d65f39 (patch) | |
tree | d072ee958bbbcea74b5907a4012173a0c3ca1c42 /chrome/test/chromeos | |
parent | 4405e6aba06c0fb938ad25df1497d3960b632630 (diff) | |
download | chromium_src-4f337ee6eafb0af5d5b30051cbbf2ff725d65f39.zip chromium_src-4f337ee6eafb0af5d5b30051cbbf2ff725d65f39.tar.gz chromium_src-4f337ee6eafb0af5d5b30051cbbf2ff725d65f39.tar.bz2 |
Pyauto-based autotest desktopui_PyAutoPerfTests now accepts suite name as parameter.
By default, the autotest still runs the same pyauto suite that runs all
the perf tests: CHROMEOS_PERF. However, the autotest now accepts a
command-line option "--suite=SUITE_NAME", to run a different pyauto suite
if needed.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/8438008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108370 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/chromeos')
2 files changed, 33 insertions, 2 deletions
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/control b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/control index 0bfcb25..193591d 100644 --- a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/control +++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/control @@ -14,6 +14,30 @@ TEST_TYPE = "client" DOC = """ This is a wrapper test for Chrome pyauto-based performance tests. http://dev.chromium.org/developers/testing/pyauto + +Sample usage: + + # Run all performance tests with the default set of arguments. + ./run_remote_tests.sh --remote=<DEVICE_IP> desktopui_PyAutoPerfTests + + # Run a single performance test. + ./run_remote_tests.sh --remote=<DEVICE_IP> desktopui_PyAutoPerfTests \ + -a 'perf.ScrollTest.testTextScroll' + + # Run a single performance test for 10 iterations, rather than the default + # number of iterations (only applies to perf tests that run iteratively). + ./run_remote_tests.sh --remote=<DEVICE_IP> desktopui_PyAutoPerfTests \ + -a 'perf.ScrollTest.testTextScroll --iterations=10' + + # Run a different pyauto suite rather than the default "CHROMEOS_PERF" + # (see the file "PYAUTO_TESTS" in the Chrome tree). + ./run_remote_tests.sh --remote=<DEVICE_IP> desktopui_PyAutoPerfTests \ + -a '--suite=OTHER_SUITE_NAME' + + # Pass arguments to the autotest via an autotest suite control file + # (use "args" for the key, and the argument string as the value). + ('desktopui_PyAutoPerfTests', \ + {'args': 'perf.ScrollTest.testTextScroll --iterations=10'}) """ job.run_test('desktopui_PyAutoPerfTests', args=args) 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 aad772b..26357d5 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 @@ -76,6 +76,11 @@ class desktopui_PyAutoPerfTests(chrome_test.ChromeTestBase): help='Maximum number of automation timeouts to ' 'ignore before failing the test. Defaults to ' 'the value given in perf.py.') + parser.add_option('--suite', dest='suite', type='string', + default='CHROMEOS_PERF', + help='Name of the suite to run, as specified in the ' + '"PYAUTO_TESTS" suite file. Defaults to ' + '%default, which runs all perf tests.') # 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 @@ -84,6 +89,8 @@ class desktopui_PyAutoPerfTests(chrome_test.ChromeTestBase): def run_once(self, args=[]): """Runs the PyAuto performance tests.""" + if isinstance(args, str): + args = args.split() options, test_args = self.parse_args(args) test_args = ' '.join(test_args) @@ -100,8 +107,8 @@ class desktopui_PyAutoPerfTests(chrome_test.ChromeTestBase): # Run the PyAuto performance tests. functional_cmd = cros_ui.xcommand_as( '%s/chrome_test/test_src/chrome/test/functional/' - 'pyauto_functional.py --suite=CHROMEOS_PERF -v %s' % ( - deps_dir, test_args)) + 'pyauto_functional.py --suite=%s -v %s' % ( + deps_dir, options.suite, test_args)) environment = os.environ.copy() if options.num_iterations: environment['NUM_ITERATIONS'] = str(options.num_iterations) |