| # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| AUTHOR = "Chrome OS Team" |
| NAME = "desktopui_PyAutoFunctionalTests" |
| PURPOSE = "PyAuto based chrome functional tests." |
| CRITERIA = "This test will fail if any of the pyauto functional tests fail." |
| TIME = "LONG" |
| TEST_CATEGORY = "Functional" |
| TEST_CLASS = "desktopui" |
| TEST_TYPE = "client" |
| |
| DOC = """ |
| This is a wrapper test for Chrome pyauto-based functional tests. |
| http://dev.chromium.org/developers/testing/pyauto |
| |
| Sample usage: |
| |
| # Auto-login and run the FULL suite, as chronos. |
| ./run_remote_tests.sh desktopui_PyAutoFunctionalTests -a suite=FULL |
| |
| # Auto-login and run tests in 'test_basic' module, as chronos. |
| ./run_remote_tests.sh desktopui_PyAutoFunctionalTests -a tests=test_basic |
| |
| # Do not auto-login and run the CHROMEOS_LOGIN suite. |
| # (tests are expected to perform login themselves if needed) |
| ./run_remote_tests.sh desktopui_PyAutoFunctionalTests \ |
| -a auto_login=False,suite=CHROMEOS_LOGIN |
| """ |
| |
| # Either suite or tests should be specified, not both. |
| suite = '' |
| tests = [] |
| auto_login = True |
| |
| # Parse comma-separated args. |
| for arg in args: |
| for item in arg.split(','): |
| key, val = item.split('=') |
| if key == 'suite': |
| suite = val |
| elif key == 'tests': |
| tests.append(val) |
| elif key == 'auto_login': |
| if val in ('0', 'False', 'false'): |
| auto_login = False |
| |
| |
| job.run_test('desktopui_PyAutoFunctionalTests', |
| suite=suite, tests=tests, auto_login=auto_login) |