Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Side by Side Diff: scripts/slave/recipes/chromedriver/chromedriver_android.py

Issue 1274723004: Converted Android Chromedriver buildbot scripts to recipes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Updated with Johns comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 from recipe_engine import recipe_api
6 from recipe_engine.types import freeze
7
8 DEPS = [
9 'adb',
10 'archive',
11 'chromedriver',
12 'chromium',
13 'chromium_android',
14 'commit_position',
15 'depot_tools/bot_update',
16 'depot_tools/gclient',
17 'recipe_engine/platform',
18 'recipe_engine/properties',
19 'recipe_engine/step',
20 ]
21
22 BUILDERS = freeze({
23 'chromium.fyi': {
24 'Android ChromeDriver Tests (dbg)': {
25 'config': 'main_builder',
26 'target': 'Debug',
27 'update_test_log': True,
28 'android_packages': [
29 'chrome_beta',
30 'chrome_public',
31 'chrome_stable',
32 'chromedriver_webview_shell',
33 ],
34 'install_apks': [
35 'ChromeDriverWebViewShell.apk',
36 'ChromePublic.apk',
37 ],
38 },
39 },
40 })
41
42 REPO_URL = 'https://chromium.googlesource.com/chromium/src.git'
43
44 def RunSteps(api):
jbudorick 2016/06/24 13:31:09 Are you planning to have a separate recipe for non
mikecase (-- gone --) 2016/06/24 18:57:50 Yeah, I guess it would be nice to just have 1 reci
45 mastername = api.properties['mastername']
46 buildername = api.properties['buildername']
47 builder = BUILDERS[mastername][buildername]
48 api.chromium_android.configure_from_properties(
49 builder['config'],
50 REPO_NAME='src',
51 REPO_URL=REPO_URL,
52 INTERNAL=False,
53 BUILD_CONFIG=builder['target'])
54 android_packages = builder.get('android_packages')
55 update_test_log = builder.get('update_test_log')
56 platform = api.chromedriver.get_chromedriver_platform(bool(android_packages))
jbudorick 2016/06/24 13:31:09 Is this necessary in a "chromedriver_android" reci
mikecase (-- gone --) 2016/06/24 18:57:50 Deleting (for now at least). When I add more platf
57
58 api.gclient.set_config('chromium')
59 api.gclient.apply_config('android')
60 api.bot_update.ensure_checkout()
61 api.chromium_android.clean_local_files()
62 api.chromium.runhooks()
63 api.chromium_android.run_tree_truth()
64
65 api.chromium_android.common_tests_setup_steps()
66
67 api.archive.download_and_unzip_build(
68 step_name='extract build',
69 target=api.chromium.c.BUILD_CONFIG,
70 build_url=None,
71 build_archive_url=api.properties.get('parent_build_archive_url'))
72 commit_position = api.commit_position.parse_revision(
73 api.properties['got_revision_cp'])
74
75 if builder['install_apks']:
76 for apk in builder['install_apks']:
77 api.chromium_android.adb_install_apk(apk)
78 api.chromedriver.download_prebuilts()
79
80 passed = True
81 try:
82 api.chromedriver.run_all_tests(
83 android_packages=android_packages,
84 archive_server_logs=True)
85 except api.step.StepFailure:
86 passed = False
87 if update_test_log:
88 api.chromedriver.update_test_results_log(platform, commit_position, passed)
89
90 api.chromium_android.common_tests_final_steps()
91
92 def GenTests(api):
93 sanitize = lambda s: ''.join(c if c.isalnum() else '_' for c in s)
94
95 yield (
96 api.test('%s_basic' % sanitize('Android ChromeDriver Tests (dbg)')) +
97 api.properties.generic(
98 buildername='Android ChromeDriver Tests (dbg)',
99 slavename='slavename',
100 mastername='chromium.fyi') +
101 api.properties(
102 parent_build_archive_url='gs://test-domain/test-archive.zip',
103 got_revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00',
104 got_revision_cp='refs/heads/master@{#333333}'))
105
106 yield (
107 api.test(
108 '%s_test_failure' % sanitize('Android ChromeDriver Tests (dbg)')) +
109 api.properties.generic(
110 buildername='Android ChromeDriver Tests (dbg)',
111 slavename='slavename',
112 mastername='chromium.fyi') +
113 api.properties(
114 parent_build_archive_url='gs://test-domain/test-archive.zip',
115 got_revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00',
116 got_revision_cp='refs/heads/master@{#333333}') +
117 api.step_data('java_tests(chrome_stable)', retcode=1))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698