diff options
author | craigdh@chromium.org <craigdh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-22 19:46:02 +0000 |
---|---|---|
committer | craigdh@chromium.org <craigdh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-22 19:46:02 +0000 |
commit | eb9f5a30d346bf2f490647b64f7bfccda1516225 (patch) | |
tree | 2b2af32fee6124085e75abf780617634b061908b | |
parent | 3f6007ab1f6075c31dc23b5ded198f22a3d08bae (diff) | |
download | chromium_src-eb9f5a30d346bf2f490647b64f7bfccda1516225.zip chromium_src-eb9f5a30d346bf2f490647b64f7bfccda1516225.tar.gz chromium_src-eb9f5a30d346bf2f490647b64f7bfccda1516225.tar.bz2 |
[chromedriver] Run tests on stable and beta channel chrome.
BUG=274681
TEST=Ran locally
Review URL: https://chromiumcodereview.appspot.com/23125011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219079 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-x | build/android/buildbot/bb_device_steps.py | 5 | ||||
-rw-r--r-- | build/android/pylib/constants.py | 3 | ||||
-rwxr-xr-x | chrome/test/chromedriver/run_buildbot_steps.py | 15 | ||||
-rwxr-xr-x | chrome/test/chromedriver/test/run_all_tests.py | 34 | ||||
-rwxr-xr-x | chrome/test/chromedriver/test/run_py_tests.py | 9 |
5 files changed, 44 insertions, 22 deletions
diff --git a/build/android/buildbot/bb_device_steps.py b/build/android/buildbot/bb_device_steps.py index 260ec76..a29e2a1 100755 --- a/build/android/buildbot/bb_device_steps.py +++ b/build/android/buildbot/bb_device_steps.py @@ -124,7 +124,10 @@ def RunChromeDriverTests(_): """Run all the steps for running chromedriver tests.""" bb_annotations.PrintNamedStep('chromedriver_annotation') RunCmd(['chrome/test/chromedriver/run_buildbot_steps.py', - '--android-package=%s' % constants.CHROMIUM_TEST_SHELL_PACKAGE]) + '--android-packages=%s,%s,%s' % + (constants.CHROMIUM_TEST_SHELL_PACKAGE, + constants.CHROME_STABLE_PACKAGE, + constants.CHROME_BETA_PACKAGE)]) def InstallApk(options, test, print_step=False): """Install an apk to all phones. diff --git a/build/android/pylib/constants.py b/build/android/pylib/constants.py index b519282..732c937 100644 --- a/build/android/pylib/constants.py +++ b/build/android/pylib/constants.py @@ -18,6 +18,9 @@ CHROME_PACKAGE = 'com.google.android.apps.chrome' CHROME_ACTIVITY = 'com.google.android.apps.chrome.Main' CHROME_DEVTOOLS_SOCKET = 'chrome_devtools_remote' +CHROME_STABLE_PACKAGE = 'com.android.chrome' +CHROME_BETA_PACKAGE = 'com.chrome.beta' + CHROME_TESTS_PACKAGE = 'com.google.android.apps.chrome.tests' LEGACY_BROWSER_PACKAGE = 'com.google.android.browser' diff --git a/chrome/test/chromedriver/run_buildbot_steps.py b/chrome/test/chromedriver/run_buildbot_steps.py index af4a10b..2b1765d 100755 --- a/chrome/test/chromedriver/run_buildbot_steps.py +++ b/chrome/test/chromedriver/run_buildbot_steps.py @@ -178,18 +178,19 @@ def WaitForLatestSnapshot(revision): def main(): parser = optparse.OptionParser() parser.add_option( - '', '--android-package', - help='Application package name, if running tests on Android.') + '', '--android-packages', + help='Comma separated list of application package names, ' + 'if running tests on Android.') parser.add_option( '-r', '--revision', type='string', default=None, help='Chromium revision') options, _ = parser.parse_args() - if not options.android_package: + if not options.android_packages: KillChromes() CleanTmpDir() - if options.android_package: + if options.android_packages: Download() else: if not options.revision: @@ -204,12 +205,12 @@ def main(): sys.executable, os.path.join(_THIS_DIR, 'test', 'run_all_tests.py'), ] - if options.android_package: - cmd.append('--android-package=' + options.android_package) + if options.android_packages: + cmd.append('--android-packages=' + options.android_packages) passed = (util.RunCommand(cmd) == 0) - if not options.android_package and passed: + if not options.android_packages and passed: MaybeRelease(options.revision) diff --git a/chrome/test/chromedriver/test/run_all_tests.py b/chrome/test/chromedriver/test/run_all_tests.py index 7236c86..d8d6852 100755 --- a/chrome/test/chromedriver/test/run_all_tests.py +++ b/chrome/test/chromedriver/test/run_all_tests.py @@ -65,7 +65,7 @@ def RunPythonTests(chromedriver, ref_chromedriver, chrome_version_name=None, android_package=None): version_info = '' if chrome_version_name: - version_info = '(v%s)' % chrome_version_name + version_info = '(%s)' % chrome_version_name util.MarkBuildStepStart('python_tests%s' % version_info) code = util.RunCommand( _GenerateTestCommand('run_py_tests.py', @@ -83,7 +83,7 @@ def RunJavaTests(chromedriver, chrome=None, chrome_version=None, chrome_version_name=None, android_package=None): version_info = '' if chrome_version_name: - version_info = '(v%s)' % chrome_version_name + version_info = '(%s)' % chrome_version_name util.MarkBuildStepStart('java_tests%s' % version_info) code = util.RunCommand( _GenerateTestCommand('run_java_tests.py', @@ -113,8 +113,9 @@ def DownloadChrome(version_name, revision, download_site): def main(): parser = optparse.OptionParser() parser.add_option( - '', '--android-package', - help='Application package name, if running tests on Android.') + '', '--android-packages', + help='Comma separated list of application package names, ' + 'if running tests on Android.') # Option 'chrome-version' is for desktop only. parser.add_option( '', '--chrome-version', @@ -130,7 +131,7 @@ def main(): server_name = 'chromedriver2_server' + exe_postfix required_build_outputs = [server_name] - if not options.android_package: + if not options.android_packages: required_build_outputs += [cpp_tests_name] build_dir = chrome_paths.GetBuildDir(required_build_outputs) print 'Using build outputs from', build_dir @@ -153,15 +154,20 @@ def main(): # For Windows bots: add ant, java(jre) and the like to system path. _AddToolsToSystemPathForWindows() - if options.android_package: + if options.android_packages: os.environ['PATH'] += os.pathsep + os.path.join( _THIS_DIR, os.pardir, 'chrome') - code1 = RunPythonTests(chromedriver, - ref_chromedriver, - android_package=options.android_package) - code2 = RunJavaTests(chromedriver, - android_package=options.android_package) - return code1 or code2 + code = 0 + for package in options.android_packages.split(','): + code1 = RunPythonTests(chromedriver, + ref_chromedriver, + chrome_version_name=package, + android_package=package) + code2 = RunJavaTests(chromedriver, + chrome_version_name=package, + android_package=package) + code = code or code1 or code2 + return code else: latest_snapshot_revision = archive.GetLatestRevision(archive.Site.SNAPSHOT) versions = [ @@ -184,10 +190,10 @@ def main(): ref_chromedriver, chrome=chrome_path, chrome_version=version[0], - chrome_version_name=version_name) + chrome_version_name='v%s' % version_name) code2 = RunJavaTests(chromedriver, chrome=chrome_path, chrome_version=version[0], - chrome_version_name=version_name) + chrome_version_name='v%s' % version_name) code = code or code1 or code2 cpp_tests = os.path.join(build_dir, cpp_tests_name) return RunCppTests(cpp_tests) or code diff --git a/chrome/test/chromedriver/test/run_py_tests.py b/chrome/test/chromedriver/test/run_py_tests.py index 452b532..c347ce2 100755 --- a/chrome/test/chromedriver/test/run_py_tests.py +++ b/chrome/test/chromedriver/test/run_py_tests.py @@ -110,6 +110,15 @@ _ANDROID_NEGATIVE_FILTER['com.google.android.apps.chrome'] = ( 'PerfTest.testColdExecuteScript', ] ) +_ANDROID_NEGATIVE_FILTER['com.android.chrome'] = ( + _ANDROID_NEGATIVE_FILTER['com.google.android.apps.chrome'] + [ + # Touch support was added to devtools in Chrome v30. + 'ChromeDriverTest.testTouchDownUpElement', + 'ChromeDriverTest.testTouchMovedElement', + ] +) +_ANDROID_NEGATIVE_FILTER['com.chrome.beta'] = ( + _ANDROID_NEGATIVE_FILTER['com.google.android.apps.chrome']) _ANDROID_NEGATIVE_FILTER['org.chromium.chrome.testshell'] = ( _ANDROID_NEGATIVE_FILTER['com.google.android.apps.chrome'] + [ # ChromiumTestShell doesn't support multiple tabs. |