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

Side by Side Diff: scripts/slave/recipes/android/perf.py

Issue 815213002: Cause chromium_android recipe to consume device_status_check's json. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Add missing files Created 6 years 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
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 DEPS = [ 5 DEPS = [
6 'adb', 6 'adb',
7 'bot_update', 7 'bot_update',
8 'chromium', 8 'chromium',
9 'chromium_android', 9 'chromium_android',
10 'gclient', 10 'gclient',
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 dep = builder.get('set_component_rev') 108 dep = builder.get('set_component_rev')
109 api.gclient.c.revisions[dep['name']] = dep['rev_str'] % component_rev 109 api.gclient.c.revisions[dep['name']] = dep['rev_str'] % component_rev
110 110
111 api.bot_update.ensure_checkout() 111 api.bot_update.ensure_checkout()
112 api.path['checkout'] = api.path['slave_build'].join('src') 112 api.path['checkout'] = api.path['slave_build'].join('src')
113 api.chromium_android.clean_local_files() 113 api.chromium_android.clean_local_files()
114 114
115 api.chromium_android.download_build(bucket=builder['bucket'], 115 api.chromium_android.download_build(bucket=builder['bucket'],
116 path=builder['path'](api)) 116 path=builder['path'](api))
117 117
118 api.chromium_android.spawn_logcat_monitor() 118 api.chromium_android.common_tests_setup_steps()
119 api.chromium_android.device_status_check()
120 api.chromium_android.provision_devices()
121 119
122 api.chromium_android.adb_install_apk( 120 api.chromium_android.adb_install_apk(
123 'ChromeShell.apk', 121 'ChromeShell.apk',
124 'org.chromium.chrome.shell') 122 'org.chromium.chrome.shell')
125 123
126 # TODO(zty): remove this in favor of device_status_check
127 api.adb.list_devices()
128 perf_tests = api.chromium.list_perf_tests( 124 perf_tests = api.chromium.list_perf_tests(
129 browser='android-chrome-shell', 125 browser='android-chrome-shell',
130 num_shards=builder['num_device_shards'], 126 num_shards=builder['num_device_shards'],
131 devices=api.adb.devices[0:1]).json.output 127 devices=api.chromium_android.devices[0:1]).json.output
132 128
133 try: 129 try:
134 api.chromium_android.run_sharded_perf_tests( 130 api.chromium_android.run_sharded_perf_tests(
135 config=api.json.input(data=perf_tests), 131 config=api.json.input(data=perf_tests),
136 perf_id=builder['perf_id'], 132 perf_id=builder['perf_id'],
137 chartjson_file=True) 133 chartjson_file=True)
138 134
139 finally: 135 finally:
140 api.chromium_android.logcat_dump() 136 api.chromium_android.common_tests_final_steps()
141 api.chromium_android.stack_tool_steps()
142 api.chromium_android.test_report()
143 137
144 def _sanitize_nonalpha(text): 138 def _sanitize_nonalpha(text):
145 return ''.join(c if c.isalnum() else '_' for c in text) 139 return ''.join(c if c.isalnum() else '_' for c in text)
146 140
147 def GenTests(api): 141 def GenTests(api):
148 for mastername, builders in BUILDERS.iteritems(): 142 for mastername, builders in BUILDERS.iteritems():
149 for buildername in builders: 143 for buildername in builders:
150 yield ( 144 yield (
151 api.test('full_%s_%s' % (_sanitize_nonalpha(mastername), 145 api.test('full_%s_%s' % (_sanitize_nonalpha(mastername),
152 _sanitize_nonalpha(buildername))) + 146 _sanitize_nonalpha(buildername))) +
153 api.properties.generic( 147 api.properties.generic(
154 repo_name='src', 148 repo_name='src',
155 repo_url=REPO_URL, 149 repo_url=REPO_URL,
156 mastername=mastername, 150 mastername=mastername,
157 buildername=buildername, 151 buildername=buildername,
158 parent_buildername='parent_buildername', 152 parent_buildername='parent_buildername',
159 parent_buildnumber='1729', 153 parent_buildnumber='1729',
160 parent_revision='deadbeef', 154 parent_revision='deadbeef',
161 revision='deadbeef', 155 revision='deadbeef',
162 slavename='slavename', 156 slavename='slavename',
163 target='Release') + 157 target='Release'))
164 api.override_step_data('List adb devices', api.json.output([
165 "014E1F310401C009", "014E1F310401C010"
166 ]))
167 )
168 yield (api.test('device_status_check') +
169 api.properties.generic(
170 repo_name='src',
171 repo_url=REPO_URL,
172 mastername='chromium.perf',
173 buildername='Android Nexus5 Perf',
174 parent_buildername='parent_buildername',
175 parent_buildnumber='1729',
176 parent_revision='deadbeef',
177 revision='deadbeef',
178 slavename='slavename',
179 target='Release')
180 + api.step_data('device_status_check', retcode=1))
181 yield (api.test('provision_devices') + 158 yield (api.test('provision_devices') +
182 api.properties.generic( 159 api.properties.generic(
183 repo_name='src', 160 repo_name='src',
184 repo_url=REPO_URL, 161 repo_url=REPO_URL,
185 mastername='chromium.perf', 162 mastername='chromium.perf',
186 buildername='Android Nexus5 Perf', 163 buildername='Android Nexus5 Perf',
187 parent_buildername='parent_buildername', 164 parent_buildername='parent_buildername',
188 parent_buildnumber='1729', 165 parent_buildnumber='1729',
189 parent_revision='deadbeef', 166 parent_revision='deadbeef',
190 revision='deadbeef', 167 revision='deadbeef',
191 slavename='slavename', 168 slavename='slavename',
192 target='Release') 169 target='Release')
193 + api.step_data('provision_devices', retcode=1)) 170 + api.step_data('provision_devices', retcode=1))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698