blob: 207b85d58b1d5d81f4e334c52e16c52053a7d8c3 [file] [log] [blame]
[email protected]e185b7e82013-01-09 03:49:571#!/usr/bin/env python
2# Copyright (c) 2013 The Chromium Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6import collections
7import glob
[email protected]485fb232013-08-22 19:56:338import hashlib
[email protected]f049a192013-10-10 01:11:269import json
[email protected]e185b7e82013-01-09 03:49:5710import os
[email protected]485fb232013-08-22 19:56:3311import random
[email protected]e2107bd2013-09-18 05:13:1012import re
[email protected]e185b7e82013-01-09 03:49:5713import shutil
[email protected]e185b7e82013-01-09 03:49:5714import sys
15
[email protected]c5282752013-06-07 23:14:3916import bb_utils
[email protected]b3873892013-07-10 04:57:1017import bb_annotations
[email protected]c5282752013-06-07 23:14:3918
[email protected]e185b7e82013-01-09 03:49:5719sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
[email protected]7849a332013-07-12 01:40:0920import provision_devices
[email protected]78af8712013-01-14 10:37:1221from pylib import android_commands
[email protected]e185b7e82013-01-09 03:49:5722from pylib import constants
[email protected]044d79b2014-04-10 19:37:3023from pylib.device import device_utils
[email protected]a8fea93f2013-01-10 04:00:0724from pylib.gtest import gtest_config
[email protected]e185b7e82013-01-09 03:49:5725
[email protected]dc8ec3f2013-09-07 07:18:1426CHROME_SRC_DIR = bb_utils.CHROME_SRC
[email protected]ae410722013-10-24 15:57:3627DIR_BUILD_ROOT = os.path.dirname(CHROME_SRC_DIR)
[email protected]dc8ec3f2013-09-07 07:18:1428CHROME_OUT_DIR = bb_utils.CHROME_OUT_DIR
dprankeec3eb0a2014-09-26 21:42:5629BLINK_SCRIPTS_DIR = 'third_party/WebKit/Tools/Scripts'
[email protected]e185b7e82013-01-09 03:49:5730
[email protected]dc8ec3f2013-09-07 07:18:1431SLAVE_SCRIPTS_DIR = os.path.join(bb_utils.BB_BUILD_DIR, 'scripts', 'slave')
32LOGCAT_DIR = os.path.join(bb_utils.CHROME_OUT_DIR, 'logcat')
[email protected]4e622cee2013-09-17 18:32:1233GS_URL = 'https://storage.googleapis.com'
[email protected]c79bc8a2014-04-24 03:39:5234GS_AUTH_URL = 'https://storage.cloud.google.com'
[email protected]e185b7e82013-01-09 03:49:5735
36# Describes an instrumation test suite:
37# test: Name of test we're running.
38# apk: apk to be installed.
39# apk_package: package for the apk to be installed.
40# test_apk: apk to run tests on.
41# test_data: data folder in format destination:source.
[email protected]37ee0c792013-08-06 19:10:1342# host_driven_root: The host-driven test root directory.
[email protected]74050272013-07-02 14:02:1543# annotation: Annotation of the tests to include.
44# exclude_annotation: The annotation of the tests to exclude.
[email protected]e185b7e82013-01-09 03:49:5745I_TEST = collections.namedtuple('InstrumentationTest', [
jbudoricke4bb2b82015-02-09 18:35:0046 'name', 'apk', 'apk_package', 'test_apk', 'test_data', 'isolate_file_path',
47 'host_driven_root', 'annotation', 'exclude_annotation', 'extra_flags'])
[email protected]74050272013-07-02 14:02:1548
[email protected]f049a192013-10-10 01:11:2649
[email protected]ae410722013-10-24 15:57:3650def SrcPath(*path):
51 return os.path.join(CHROME_SRC_DIR, *path)
52
jbudorick34902132014-12-09 14:24:5653
jbudoricke4bb2b82015-02-09 18:35:0054def I(name, apk, apk_package, test_apk, test_data, isolate_file_path=None,
55 host_driven_root=None, annotation=None, exclude_annotation=None,
56 extra_flags=None):
57 return I_TEST(name, apk, apk_package, test_apk, test_data, isolate_file_path,
58 host_driven_root, annotation, exclude_annotation, extra_flags)
[email protected]e185b7e82013-01-09 03:49:5759
60INSTRUMENTATION_TESTS = dict((suite.name, suite) for suite in [
[email protected]74050272013-07-02 14:02:1561 I('ContentShell',
62 'ContentShell.apk',
63 'org.chromium.content_shell_apk',
jbudorick34902132014-12-09 14:24:5664 'ContentShellTest',
jbudoricke4bb2b82015-02-09 18:35:0065 'content:content/test/data/android/device_files',
66 isolate_file_path='content/content_shell_test_apk.isolate'),
[email protected]efeb59e2014-03-12 01:31:2667 I('ChromeShell',
68 'ChromeShell.apk',
[email protected]34460fc2014-03-04 07:18:0069 'org.chromium.chrome.shell',
[email protected]efeb59e2014-03-12 01:31:2670 'ChromeShellTest',
jbudorick34902132014-12-09 14:24:5671 'chrome:chrome/test/data/android/device_files',
jbudoricke4bb2b82015-02-09 18:35:0072 isolate_file_path='chrome/chrome_shell_test_apk.isolate',
73 host_driven_root=constants.CHROME_SHELL_HOST_DRIVEN_DIR),
[email protected]74050272013-07-02 14:02:1574 I('AndroidWebView',
75 'AndroidWebView.apk',
76 'org.chromium.android_webview.shell',
jbudorick34902132014-12-09 14:24:5677 'AndroidWebViewTest',
jbudoricke4bb2b82015-02-09 18:35:0078 'webview:android_webview/test/data/device_files',
79 isolate_file_path='android_webview/android_webview_test_apk.isolate'),
mikecase94c8f1ad3b2014-10-27 23:09:3680 I('ChromeSyncShell',
81 'ChromeSyncShell.apk',
82 'org.chromium.chrome.browser.sync',
jbudorick34902132014-12-09 14:24:5683 'ChromeSyncShellTest',
84 None),
[email protected]e185b7e82013-01-09 03:49:5785 ])
86
jbudorickc574b1b2014-12-04 18:21:2887InstallablePackage = collections.namedtuple('InstallablePackage', [
88 'name', 'apk', 'apk_package'])
89
90INSTALLABLE_PACKAGES = dict((package.name, package) for package in (
91 [InstallablePackage(i.name, i.apk, i.apk_package)
92 for i in INSTRUMENTATION_TESTS.itervalues()] +
93 [InstallablePackage('ChromeDriverWebViewShell',
94 'ChromeDriverWebViewShell.apk',
95 'org.chromium.chromedriver_webview_shell')]))
96
jbudorick71a24982015-05-11 19:12:5697VALID_TESTS = set([
98 'base_junit_tests',
99 'chromedriver',
100 'chrome_proxy',
101 'components_browsertests',
102 'gfx_unittests',
103 'gpu',
104 'python_unittests',
105 'telemetry_unittests',
106 'telemetry_perf_unittests',
107 'ui',
108 'unit',
109 'webkit',
110 'webkit_layout'
111])
[email protected]e185b7e82013-01-09 03:49:57112
[email protected]c5282752013-06-07 23:14:39113RunCmd = bb_utils.RunCmd
[email protected]e185b7e82013-01-09 03:49:57114
115
[email protected]e7bd3412013-09-20 17:15:28116def _GetRevision(options):
117 """Get the SVN revision number.
118
119 Args:
120 options: options object.
121
122 Returns:
123 The revision number.
124 """
125 revision = options.build_properties.get('got_revision')
126 if not revision:
127 revision = options.build_properties.get('revision', 'testing')
128 return revision
129
130
[email protected]f762c1202014-08-13 09:36:34131def _RunTest(options, cmd, suite):
132 """Run test command with runtest.py.
133
134 Args:
135 options: options object.
136 cmd: the command to run.
137 suite: test name.
138 """
139 property_args = bb_utils.EncodeProperties(options)
140 args = [os.path.join(SLAVE_SCRIPTS_DIR, 'runtest.py')] + property_args
141 args += ['--test-platform', 'android']
142 if options.factory_properties.get('generate_gtest_json'):
143 args.append('--generate-json-file')
144 args += ['-o', 'gtest-results/%s' % suite,
145 '--annotate', 'gtest',
146 '--build-number', str(options.build_properties.get('buildnumber',
147 '')),
148 '--builder-name', options.build_properties.get('buildername', '')]
149 if options.target == 'Release':
150 args += ['--target', 'Release']
151 else:
152 args += ['--target', 'Debug']
mikecase97d50b62014-11-14 18:33:52153 if options.flakiness_server:
154 args += ['--flakiness-dashboard-server=%s' %
155 options.flakiness_server]
[email protected]f762c1202014-08-13 09:36:34156 args += cmd
157 RunCmd(args, cwd=DIR_BUILD_ROOT)
158
159
[email protected]0ceb14992014-05-24 00:37:26160def RunTestSuites(options, suites, suites_options=None):
[email protected]fbe29322013-07-09 09:03:26161 """Manages an invocation of test_runner.py for gtests.
[email protected]e185b7e82013-01-09 03:49:57162
163 Args:
164 options: options object.
[email protected]9e689252013-07-30 20:14:36165 suites: List of suite names to run.
[email protected]0ceb14992014-05-24 00:37:26166 suites_options: Command line options dictionary for particular suites.
167 For example,
168 {'content_browsertests', ['--num_retries=1', '--release']}
169 will add the options only to content_browsertests.
[email protected]e185b7e82013-01-09 03:49:57170 """
[email protected]0ceb14992014-05-24 00:37:26171
172 if not suites_options:
173 suites_options = {}
174
[email protected]e185b7e82013-01-09 03:49:57175 args = ['--verbose']
[email protected]e185b7e82013-01-09 03:49:57176 if options.target == 'Release':
177 args.append('--release')
178 if options.asan:
179 args.append('--tool=asan')
[email protected]18d59b82013-11-12 09:21:41180 if options.gtest_filter:
181 args.append('--gtest-filter=%s' % options.gtest_filter)
[email protected]0ceb14992014-05-24 00:37:26182
[email protected]a8fea93f2013-01-10 04:00:07183 for suite in suites:
[email protected]9e689252013-07-30 20:14:36184 bb_annotations.PrintNamedStep(suite)
[email protected]f762c1202014-08-13 09:36:34185 cmd = [suite] + args
[email protected]0ceb14992014-05-24 00:37:26186 cmd += suites_options.get(suite, [])
jbudorickc4b6b6512015-04-23 21:30:28187 if suite == 'content_browsertests' or suite == 'components_browsertests':
[email protected]9e689252013-07-30 20:14:36188 cmd.append('--num_retries=1')
[email protected]f762c1202014-08-13 09:36:34189 _RunTest(options, cmd, suite)
[email protected]e185b7e82013-01-09 03:49:57190
[email protected]f049a192013-10-10 01:11:26191
jbudorick8548f23e2015-05-11 14:08:14192def RunJunitSuite(suite):
193 RunCmd(['build/android/test_runner.py', 'junit', '-s', suite])
194
195
[email protected]e7bd3412013-09-20 17:15:28196def RunChromeDriverTests(options):
[email protected]d8897f6c2013-03-05 00:27:16197 """Run all the steps for running chromedriver tests."""
[email protected]b3873892013-07-10 04:57:10198 bb_annotations.PrintNamedStep('chromedriver_annotation')
[email protected]d8897f6c2013-03-05 00:27:16199 RunCmd(['chrome/test/chromedriver/run_buildbot_steps.py',
[email protected]b1010d262013-11-27 22:01:28200 '--android-packages=%s,%s,%s,%s' %
[email protected]efeb59e2014-03-12 01:31:26201 ('chrome_shell',
[email protected]4418f022013-11-11 19:21:03202 'chrome_stable',
[email protected]b1010d262013-11-27 22:01:28203 'chrome_beta',
204 'chromedriver_webview_shell'),
[email protected]e7bd3412013-09-20 17:15:28205 '--revision=%s' % _GetRevision(options),
[email protected]fde07002013-09-20 21:02:39206 '--update-log'])
[email protected]d8897f6c2013-03-05 00:27:16207
[email protected]03779092014-07-24 11:44:27208def RunChromeProxyTests(options):
209 """Run the chrome_proxy tests.
210
211 Args:
212 options: options object.
213 """
214 InstallApk(options, INSTRUMENTATION_TESTS['ChromeShell'], False)
215 args = ['--browser', 'android-chrome-shell']
216 devices = android_commands.GetAttachedDevices()
217 if devices:
218 args = args + ['--device', devices[0]]
219 bb_annotations.PrintNamedStep('chrome_proxy')
220 RunCmd(['tools/chrome_proxy/run_tests'] + args)
[email protected]f049a192013-10-10 01:11:26221
mikecase0178d482014-08-27 21:58:18222
navabi4167dc62014-11-21 01:25:08223def RunTelemetryTests(options, step_name, run_tests_path):
navabi40c05fc2014-11-20 18:09:45224 """Runs either telemetry_perf_unittests or telemetry_unittests.
[email protected]29f7e7c2014-04-24 00:55:22225
226 Args:
227 options: options object.
navabi4167dc62014-11-21 01:25:08228 step_name: either 'telemetry_unittests' or 'telemetry_perf_unittests'
navabi40c05fc2014-11-20 18:09:45229 run_tests_path: path to run_tests script (tools/perf/run_tests for
230 perf_unittests and tools/telemetry/run_tests for
231 telemetry_unittests)
[email protected]29f7e7c2014-04-24 00:55:22232 """
233 InstallApk(options, INSTRUMENTATION_TESTS['ChromeShell'], False)
[email protected]5af43ef2014-06-04 17:40:06234 args = ['--browser', 'android-chrome-shell']
[email protected]29f7e7c2014-04-24 00:55:22235 devices = android_commands.GetAttachedDevices()
236 if devices:
zhenw937b6c982015-03-03 23:05:57237 args = args + ['--device', 'android']
navabi4167dc62014-11-21 01:25:08238 bb_annotations.PrintNamedStep(step_name)
navabi40c05fc2014-11-20 18:09:45239 RunCmd([run_tests_path] + args)
[email protected]29f7e7c2014-04-24 00:55:22240
241
[email protected]a2a725242013-01-09 21:52:57242def InstallApk(options, test, print_step=False):
243 """Install an apk to all phones.
244
245 Args:
246 options: options object
247 test: An I_TEST namedtuple
248 print_step: Print a buildbot step
249 """
250 if print_step:
[email protected]b3873892013-07-10 04:57:10251 bb_annotations.PrintNamedStep('install_%s' % test.name.lower())
[email protected]6ca57512013-08-23 21:42:04252
[email protected]068b9cb42014-06-08 20:11:16253 args = ['--apk_package', test.apk_package]
[email protected]a2a725242013-01-09 21:52:57254 if options.target == 'Release':
[email protected]e185b7e82013-01-09 03:49:57255 args.append('--release')
[email protected]068b9cb42014-06-08 20:11:16256 args.append(test.apk)
[email protected]e185b7e82013-01-09 03:49:57257
[email protected]800673bf2013-05-14 17:15:30258 RunCmd(['build/android/adb_install_apk.py'] + args, halt_on_failure=True)
[email protected]e185b7e82013-01-09 03:49:57259
260
[email protected]acfaf4c2013-07-25 00:23:56261def RunInstrumentationSuite(options, test, flunk_on_failure=True,
[email protected]54c2d532013-08-24 01:36:24262 python_only=False, official_build=False):
[email protected]fbe29322013-07-09 09:03:26263 """Manages an invocation of test_runner.py for instrumentation tests.
[email protected]e185b7e82013-01-09 03:49:57264
265 Args:
266 options: options object
267 test: An I_TEST namedtuple
[email protected]acfaf4c2013-07-25 00:23:56268 flunk_on_failure: Flunk the step if tests fail.
269 Python: Run only host driven Python tests.
[email protected]54c2d532013-08-24 01:36:24270 official_build: Run official-build tests.
[email protected]e185b7e82013-01-09 03:49:57271 """
[email protected]b3873892013-07-10 04:57:10272 bb_annotations.PrintNamedStep('%s_instrumentation_tests' % test.name.lower())
[email protected]e185b7e82013-01-09 03:49:57273
[email protected]10955d32014-04-30 11:22:41274 if test.apk:
275 InstallApk(options, test)
276 args = ['--test-apk', test.test_apk, '--verbose']
277 if test.test_data:
278 args.extend(['--test_data', test.test_data])
[email protected]e185b7e82013-01-09 03:49:57279 if options.target == 'Release':
280 args.append('--release')
281 if options.asan:
282 args.append('--tool=asan')
[email protected]14f139f42013-07-24 18:41:58283 if options.flakiness_server:
[email protected]b796a772013-01-19 03:55:22284 args.append('--flakiness-dashboard-server=%s' %
[email protected]14f139f42013-07-24 18:41:58285 options.flakiness_server)
[email protected]485fb232013-08-22 19:56:33286 if options.coverage_bucket:
287 args.append('--coverage-dir=%s' % options.coverage_dir)
jbudoricke4bb2b82015-02-09 18:35:00288 if test.isolate_file_path:
289 args.append('--isolate-file-path=%s' % test.isolate_file_path)
[email protected]8d8ca042013-02-14 19:29:17290 if test.host_driven_root:
[email protected]67954f822013-08-14 18:09:08291 args.append('--host-driven-root=%s' % test.host_driven_root)
[email protected]74050272013-07-02 14:02:15292 if test.annotation:
293 args.extend(['-A', test.annotation])
294 if test.exclude_annotation:
295 args.extend(['-E', test.exclude_annotation])
296 if test.extra_flags:
297 args.extend(test.extra_flags)
[email protected]acfaf4c2013-07-25 00:23:56298 if python_only:
299 args.append('-p')
[email protected]54c2d532013-08-24 01:36:24300 if official_build:
301 # The option needs to be assigned 'True' as it does not have an action
302 # associated with it.
303 args.append('--official-build')
[email protected]e185b7e82013-01-09 03:49:57304
[email protected]bdd22ff2013-07-17 17:21:12305 RunCmd(['build/android/test_runner.py', 'instrumentation'] + args,
306 flunk_on_failure=flunk_on_failure)
[email protected]e185b7e82013-01-09 03:49:57307
308
fdegans7b06b612014-09-26 09:50:53309def RunWebkitLint():
[email protected]e185b7e82013-01-09 03:49:57310 """Lint WebKit's TestExpectation files."""
[email protected]b3873892013-07-10 04:57:10311 bb_annotations.PrintNamedStep('webkit_lint')
dprankeec3eb0a2014-09-26 21:42:56312 RunCmd([SrcPath(os.path.join(BLINK_SCRIPTS_DIR, 'lint-test-expectations'))])
[email protected]e185b7e82013-01-09 03:49:57313
314
315def RunWebkitLayoutTests(options):
316 """Run layout tests on an actual device."""
[email protected]b3873892013-07-10 04:57:10317 bb_annotations.PrintNamedStep('webkit_tests')
[email protected]22ee7002013-01-23 20:58:04318 cmd_args = [
[email protected]f049a192013-10-10 01:11:26319 '--no-show-results',
320 '--no-new-test-results',
321 '--full-results-html',
322 '--clobber-old-results',
323 '--exit-after-n-failures', '5000',
324 '--exit-after-n-crashes-or-timeouts', '100',
325 '--debug-rwt-logging',
326 '--results-directory', '../layout-test-results',
327 '--target', options.target,
328 '--builder-name', options.build_properties.get('buildername', ''),
329 '--build-number', str(options.build_properties.get('buildnumber', '')),
330 '--master-name', 'ChromiumWebkit', # TODO: Get this from the cfg.
331 '--build-name', options.build_properties.get('buildername', ''),
332 '--platform=android']
[email protected]22ee7002013-01-23 20:58:04333
hendrikw1904804a2015-04-17 18:44:51334 for flag in 'test_results_server', 'driver_name', 'additional_driver_flag':
[email protected]22ee7002013-01-23 20:58:04335 if flag in options.factory_properties:
336 cmd_args.extend(['--%s' % flag.replace('_', '-'),
337 options.factory_properties.get(flag)])
338
[email protected]2c39b292013-03-20 09:34:10339 for f in options.factory_properties.get('additional_expectations', []):
340 cmd_args.extend(
[email protected]dc8ec3f2013-09-07 07:18:14341 ['--additional-expectations=%s' % os.path.join(CHROME_SRC_DIR, *f)])
[email protected]2c39b292013-03-20 09:34:10342
343 # TODO(dpranke): Remove this block after
344 # https://codereview.chromium.org/12927002/ lands.
[email protected]22ee7002013-01-23 20:58:04345 for f in options.factory_properties.get('additional_expectations_files', []):
[email protected]62c5b982013-01-26 08:23:16346 cmd_args.extend(
[email protected]dc8ec3f2013-09-07 07:18:14347 ['--additional-expectations=%s' % os.path.join(CHROME_SRC_DIR, *f)])
[email protected]22ee7002013-01-23 20:58:04348
ager158f2842014-09-26 06:07:24349 exit_code = RunCmd(
dprankeec3eb0a2014-09-26 21:42:56350 [SrcPath(os.path.join(BLINK_SCRIPTS_DIR, 'run-webkit-tests'))] + cmd_args)
[email protected]1782ef42013-10-18 21:07:33351 if exit_code == 255: # test_run_results.UNEXPECTED_ERROR_EXIT_STATUS
[email protected]f049a192013-10-10 01:11:26352 bb_annotations.PrintMsg('?? (crashed or hung)')
[email protected]1782ef42013-10-18 21:07:33353 elif exit_code == 254: # test_run_results.NO_DEVICES_EXIT_STATUS
[email protected]361229ac2013-10-17 18:57:15354 bb_annotations.PrintMsg('?? (no devices found)')
[email protected]1782ef42013-10-18 21:07:33355 elif exit_code == 253: # test_run_results.NO_TESTS_EXIT_STATUS
[email protected]361229ac2013-10-17 18:57:15356 bb_annotations.PrintMsg('?? (no tests found)')
[email protected]f049a192013-10-10 01:11:26357 else:
358 full_results_path = os.path.join('..', 'layout-test-results',
359 'full_results.json')
360 if os.path.exists(full_results_path):
361 full_results = json.load(open(full_results_path))
[email protected]e2782b82013-10-14 19:43:45362 unexpected_passes, unexpected_failures, unexpected_flakes = (
[email protected]f049a192013-10-10 01:11:26363 _ParseLayoutTestResults(full_results))
364 if unexpected_failures:
dpranked7cae312015-02-08 02:40:54365 _PrintDashboardLink('failed', unexpected_failures.keys(),
[email protected]f049a192013-10-10 01:11:26366 max_tests=25)
367 elif unexpected_passes:
dpranked7cae312015-02-08 02:40:54368 _PrintDashboardLink('unexpected passes', unexpected_passes.keys(),
[email protected]f049a192013-10-10 01:11:26369 max_tests=10)
370 if unexpected_flakes:
dpranked7cae312015-02-08 02:40:54371 _PrintDashboardLink('unexpected flakes', unexpected_flakes.keys(),
[email protected]f049a192013-10-10 01:11:26372 max_tests=10)
[email protected]bc14cb12013-10-10 18:47:14373
374 if exit_code == 0 and (unexpected_passes or unexpected_flakes):
375 # If exit_code != 0, RunCmd() will have already printed an error.
376 bb_annotations.PrintWarning()
[email protected]f049a192013-10-10 01:11:26377 else:
[email protected]bc14cb12013-10-10 18:47:14378 bb_annotations.PrintError()
[email protected]f049a192013-10-10 01:11:26379 bb_annotations.PrintMsg('?? (results missing)')
[email protected]e185b7e82013-01-09 03:49:57380
[email protected]dc8ec3f2013-09-07 07:18:14381 if options.factory_properties.get('archive_webkit_results', False):
382 bb_annotations.PrintNamedStep('archive_webkit_results')
[email protected]613e5a32013-09-18 01:46:32383 base = 'https://storage.googleapis.com/chromium-layout-test-archives'
384 builder_name = options.build_properties.get('buildername', '')
385 build_number = str(options.build_properties.get('buildnumber', ''))
[email protected]f049a192013-10-10 01:11:26386 results_link = '%s/%s/%s/layout-test-results/results.html' % (
387 base, EscapeBuilderName(builder_name), build_number)
388 bb_annotations.PrintLink('results', results_link)
[email protected]e2107bd2013-09-18 05:13:10389 bb_annotations.PrintLink('(zip)', '%s/%s/%s/layout-test-results.zip' % (
390 base, EscapeBuilderName(builder_name), build_number))
[email protected]85db7daf32013-09-09 21:21:25391 gs_bucket = 'gs://chromium-layout-test-archives'
[email protected]dc8ec3f2013-09-07 07:18:14392 RunCmd([os.path.join(SLAVE_SCRIPTS_DIR, 'chromium',
393 'archive_layout_test_results.py'),
[email protected]f049a192013-10-10 01:11:26394 '--results-dir', '../../layout-test-results',
[email protected]f049a192013-10-10 01:11:26395 '--build-number', build_number,
396 '--builder-name', builder_name,
[email protected]ae410722013-10-24 15:57:36397 '--gs-bucket', gs_bucket],
398 cwd=DIR_BUILD_ROOT)
[email protected]f049a192013-10-10 01:11:26399
400
401def _ParseLayoutTestResults(results):
402 """Extract the failures from the test run."""
403 # Cloned from third_party/WebKit/Tools/Scripts/print-json-test-results
404 tests = _ConvertTrieToFlatPaths(results['tests'])
405 failures = {}
406 flakes = {}
407 passes = {}
408 for (test, result) in tests.iteritems():
409 if result.get('is_unexpected'):
[email protected]ff81fe112013-10-22 21:13:16410 actual_results = result['actual'].split()
411 expected_results = result['expected'].split()
412 if len(actual_results) > 1:
413 # We report the first failure type back, even if the second
414 # was more severe.
415 if actual_results[1] in expected_results:
416 flakes[test] = actual_results[0]
417 else:
418 failures[test] = actual_results[0]
419 elif actual_results[0] == 'PASS':
[email protected]f049a192013-10-10 01:11:26420 passes[test] = result
421 else:
[email protected]ff81fe112013-10-22 21:13:16422 failures[test] = actual_results[0]
[email protected]f049a192013-10-10 01:11:26423
424 return (passes, failures, flakes)
425
426
427def _ConvertTrieToFlatPaths(trie, prefix=None):
428 """Flatten the trie of failures into a list."""
429 # Cloned from third_party/WebKit/Tools/Scripts/print-json-test-results
430 result = {}
431 for name, data in trie.iteritems():
432 if prefix:
433 name = prefix + '/' + name
434
435 if len(data) and 'actual' not in data and 'expected' not in data:
436 result.update(_ConvertTrieToFlatPaths(data, name))
437 else:
438 result[name] = data
439
440 return result
441
442
443def _PrintDashboardLink(link_text, tests, max_tests):
444 """Add a link to the flakiness dashboard in the step annotations."""
445 if len(tests) > max_tests:
446 test_list_text = ' '.join(tests[:max_tests]) + ' and more'
447 else:
448 test_list_text = ' '.join(tests)
449
450 dashboard_base = ('http://test-results.appspot.com'
451 '/dashboards/flakiness_dashboard.html#'
452 'master=ChromiumWebkit&tests=')
453
454 bb_annotations.PrintLink('%d %s: %s' %
455 (len(tests), link_text, test_list_text),
456 dashboard_base + ','.join(tests))
[email protected]dc8ec3f2013-09-07 07:18:14457
[email protected]e185b7e82013-01-09 03:49:57458
[email protected]e2107bd2013-09-18 05:13:10459def EscapeBuilderName(builder_name):
460 return re.sub('[ ()]', '_', builder_name)
461
462
[email protected]74050272013-07-02 14:02:15463def SpawnLogcatMonitor():
464 shutil.rmtree(LOGCAT_DIR, ignore_errors=True)
[email protected]97d10322013-10-04 20:53:04465 bb_utils.SpawnCmd([
[email protected]dc8ec3f2013-09-07 07:18:14466 os.path.join(CHROME_SRC_DIR, 'build', 'android', 'adb_logcat_monitor.py'),
[email protected]74050272013-07-02 14:02:15467 LOGCAT_DIR])
468
469 # Wait for logcat_monitor to pull existing logcat
470 RunCmd(['sleep', '5'])
471
[email protected]f049a192013-10-10 01:11:26472
[email protected]74050272013-07-02 14:02:15473def ProvisionDevices(options):
[email protected]b3873892013-07-10 04:57:10474 bb_annotations.PrintNamedStep('provision_devices')
[email protected]abfec372013-08-16 07:22:16475
476 if not bb_utils.TESTING:
477 # Restart adb to work around bugs, sleep to wait for usb discovery.
[email protected]781c58a2014-05-14 05:32:16478 device_utils.RestartServer()
[email protected]abfec372013-08-16 07:22:16479 RunCmd(['sleep', '1'])
[email protected]7849a332013-07-12 01:40:09480 provision_cmd = ['build/android/provision_devices.py', '-t', options.target]
481 if options.auto_reconnect:
482 provision_cmd.append('--auto-reconnect')
[email protected]3356038b2014-06-17 02:40:13483 if options.skip_wipe:
484 provision_cmd.append('--skip-wipe')
jbudorick9669e5b2015-03-09 16:29:07485 if options.disable_location:
486 provision_cmd.append('--disable-location')
[email protected]7b54a8722014-07-17 21:51:21487 RunCmd(provision_cmd, halt_on_failure=True)
[email protected]78af8712013-01-14 10:37:12488
[email protected]74050272013-07-02 14:02:15489
[email protected]e5d85a72013-10-19 13:44:02490def DeviceStatusCheck(options):
[email protected]b3873892013-07-10 04:57:10491 bb_annotations.PrintNamedStep('device_status_check')
[email protected]e5d85a72013-10-19 13:44:02492 cmd = ['build/android/buildbot/bb_device_status_check.py']
493 if options.restart_usb:
494 cmd.append('--restart-usb')
495 RunCmd(cmd, halt_on_failure=True)
[email protected]693c54d2013-01-09 19:41:25496
[email protected]e185b7e82013-01-09 03:49:57497
[email protected]74050272013-07-02 14:02:15498def GetDeviceSetupStepCmds():
499 return [
[email protected]f049a192013-10-10 01:11:26500 ('device_status_check', DeviceStatusCheck),
[email protected]917cd320b2013-12-03 16:13:35501 ('provision_devices', ProvisionDevices),
[email protected]74050272013-07-02 14:02:15502 ]
[email protected]e185b7e82013-01-09 03:49:57503
[email protected]e185b7e82013-01-09 03:49:57504
[email protected]74050272013-07-02 14:02:15505def RunUnitTests(options):
[email protected]502362c72014-02-26 07:06:44506 suites = gtest_config.STABLE_TEST_SUITES
507 if options.asan:
508 suites = [s for s in suites
509 if s not in gtest_config.ASAN_EXCLUDED_TEST_SUITES]
510 RunTestSuites(options, suites)
[email protected]74050272013-07-02 14:02:15511
512
klundbergb07e8ed92014-11-19 16:53:11513def RunTelemetryUnitTests(options):
navabi4167dc62014-11-21 01:25:08514 RunTelemetryTests(options, 'telemetry_unittests', 'tools/telemetry/run_tests')
klundbergb07e8ed92014-11-19 16:53:11515
516
navabi40c05fc2014-11-20 18:09:45517def RunTelemetryPerfUnitTests(options):
navabi4167dc62014-11-21 01:25:08518 RunTelemetryTests(options, 'telemetry_perf_unittests', 'tools/perf/run_tests')
519
navabi40c05fc2014-11-20 18:09:45520
[email protected]74050272013-07-02 14:02:15521def RunInstrumentationTests(options):
522 for test in INSTRUMENTATION_TESTS.itervalues():
523 RunInstrumentationSuite(options, test)
524
525
526def RunWebkitTests(options):
[email protected]130d0b572014-02-03 18:09:01527 RunTestSuites(options, ['webkit_unit_tests', 'blink_heap_unittests'])
fdegans7b06b612014-09-26 09:50:53528 RunWebkitLint()
[email protected]74050272013-07-02 14:02:15529
530
[email protected]a4b1ec972013-09-14 05:36:25531def RunGPUTests(options):
[email protected]9047cd182014-05-29 01:04:06532 revision = _GetRevision(options)
[email protected]5117f5d2014-05-29 16:59:16533 builder_name = options.build_properties.get('buildername', 'noname')
534
535 bb_annotations.PrintNamedStep('pixel_tests')
[email protected]389234f2014-02-25 03:31:12536 RunCmd(['content/test/gpu/run_gpu_test.py',
[email protected]e66b5922014-01-07 20:10:04537 'pixel',
538 '--browser',
539 'android-content-shell',
540 '--build-revision',
541 str(revision),
542 '--upload-refimg-to-cloud-storage',
543 '--refimg-cloud-storage-bucket',
544 'chromium-gpu-archive/reference-images',
545 '--os-type',
546 'android',
547 '--test-machine-name',
[email protected]5117f5d2014-05-29 16:59:16548 EscapeBuilderName(builder_name)])
[email protected]fb9cd4bb2013-10-16 21:59:53549
[email protected]cce70f02013-10-15 12:53:19550 bb_annotations.PrintNamedStep('webgl_conformance_tests')
[email protected]389234f2014-02-25 03:31:12551 RunCmd(['content/test/gpu/run_gpu_test.py',
[email protected]cce70f02013-10-15 12:53:19552 '--browser=android-content-shell', 'webgl_conformance',
553 '--webgl-conformance-version=1.0.1'])
[email protected]bb508f82013-09-06 06:42:24554
sieversb44610f2015-05-05 23:06:17555 bb_annotations.PrintNamedStep('android_webview_webgl_conformance_tests')
556 RunCmd(['content/test/gpu/run_gpu_test.py',
557 '--browser=android-webview-shell', 'webgl_conformance',
558 '--webgl-conformance-version=1.0.1'])
559
[email protected]876cb602014-05-31 04:49:15560 bb_annotations.PrintNamedStep('gpu_rasterization_tests')
561 RunCmd(['content/test/gpu/run_gpu_test.py',
562 'gpu_rasterization',
563 '--browser',
564 'android-content-shell',
565 '--build-revision',
566 str(revision),
567 '--test-machine-name',
568 EscapeBuilderName(builder_name)])
569
[email protected]bb508f82013-09-06 06:42:24570
jbudorick256fd532014-10-24 01:50:13571def RunPythonUnitTests(_options):
572 for suite in constants.PYTHON_UNIT_TEST_SUITES:
573 bb_annotations.PrintNamedStep(suite)
574 RunCmd(['build/android/test_runner.py', 'python', '-s', suite])
575
576
[email protected]74050272013-07-02 14:02:15577def GetTestStepCmds():
578 return [
jbudorick8548f23e2015-05-11 14:08:14579 ('base_junit_tests',
580 lambda _options: RunJunitSuite('base_junit_tests')),
[email protected]74050272013-07-02 14:02:15581 ('chromedriver', RunChromeDriverTests),
[email protected]03779092014-07-24 11:44:27582 ('chrome_proxy', RunChromeProxyTests),
jbudorickc4b6b6512015-04-23 21:30:28583 ('components_browsertests',
584 lambda options: RunTestSuites(options, ['components_browsertests'])),
tfarina43d93532015-05-11 18:04:07585 ('gfx_unittests',
586 lambda options: RunTestSuites(options, ['gfx_unittests'])),
[email protected]bb508f82013-09-06 06:42:24587 ('gpu', RunGPUTests),
jbudorick256fd532014-10-24 01:50:13588 ('python_unittests', RunPythonUnitTests),
klundbergb07e8ed92014-11-19 16:53:11589 ('telemetry_unittests', RunTelemetryUnitTests),
[email protected]29f7e7c2014-04-24 00:55:22590 ('telemetry_perf_unittests', RunTelemetryPerfUnitTests),
[email protected]74050272013-07-02 14:02:15591 ('ui', RunInstrumentationTests),
mikecase0178d482014-08-27 21:58:18592 ('unit', RunUnitTests),
[email protected]74050272013-07-02 14:02:15593 ('webkit', RunWebkitTests),
[email protected]02bfada2013-08-12 05:00:52594 ('webkit_layout', RunWebkitLayoutTests),
[email protected]74050272013-07-02 14:02:15595 ]
596
597
[email protected]c11a4682014-04-22 23:04:13598def MakeGSPath(options, gs_base_dir):
599 revision = _GetRevision(options)
600 bot_id = options.build_properties.get('buildername', 'testing')
601 randhash = hashlib.sha1(str(random.random())).hexdigest()
602 gs_path = '%s/%s/%s/%s' % (gs_base_dir, bot_id, revision, randhash)
[email protected]c79bc8a2014-04-24 03:39:52603 # remove double slashes, happens with blank revisions and confuses gsutil
604 gs_path = re.sub('/+', '/', gs_path)
[email protected]c11a4682014-04-22 23:04:13605 return gs_path
606
[email protected]4e622cee2013-09-17 18:32:12607def UploadHTML(options, gs_base_dir, dir_to_upload, link_text,
608 link_rel_path='index.html', gs_url=GS_URL):
609 """Uploads directory at |dir_to_upload| to Google Storage and output a link.
[email protected]485fb232013-08-22 19:56:33610
611 Args:
612 options: Command line options.
[email protected]4e622cee2013-09-17 18:32:12613 gs_base_dir: The Google Storage base directory (e.g.
614 'chromium-code-coverage/java')
615 dir_to_upload: Absolute path to the directory to be uploaded.
616 link_text: Link text to be displayed on the step.
617 link_rel_path: Link path relative to |dir_to_upload|.
618 gs_url: Google storage URL.
[email protected]485fb232013-08-22 19:56:33619 """
[email protected]c11a4682014-04-22 23:04:13620 gs_path = MakeGSPath(options, gs_base_dir)
[email protected]4e622cee2013-09-17 18:32:12621 RunCmd([bb_utils.GSUTIL_PATH, 'cp', '-R', dir_to_upload, 'gs://%s' % gs_path])
622 bb_annotations.PrintLink(link_text,
[email protected]f049a192013-10-10 01:11:26623 '%s/%s/%s' % (gs_url, gs_path, link_rel_path))
[email protected]485fb232013-08-22 19:56:33624
625
626def GenerateJavaCoverageReport(options):
627 """Generates an HTML coverage report using EMMA and uploads it."""
628 bb_annotations.PrintNamedStep('java_coverage_report')
629
630 coverage_html = os.path.join(options.coverage_dir, 'coverage_html')
631 RunCmd(['build/android/generate_emma_html.py',
632 '--coverage-dir', options.coverage_dir,
[email protected]dc8ec3f2013-09-07 07:18:14633 '--metadata-dir', os.path.join(CHROME_OUT_DIR, options.target),
[email protected]a1f1abfe2013-08-27 22:02:43634 '--cleanup',
[email protected]485fb232013-08-22 19:56:33635 '--output', os.path.join(coverage_html, 'index.html')])
[email protected]4e622cee2013-09-17 18:32:12636 return coverage_html
[email protected]485fb232013-08-22 19:56:33637
638
[email protected]74050272013-07-02 14:02:15639def LogcatDump(options):
[email protected]e185b7e82013-01-09 03:49:57640 # Print logcat, kill logcat monitor
[email protected]b3873892013-07-10 04:57:10641 bb_annotations.PrintNamedStep('logcat_dump')
[email protected]6fe4d062014-05-03 00:07:30642 logcat_file = os.path.join(CHROME_OUT_DIR, options.target, 'full_log.txt')
jbudorick0f77e962014-11-19 15:41:29643 RunCmd([SrcPath('build', 'android', 'adb_logcat_printer.py'),
[email protected]46e095c2013-11-21 13:48:58644 '--output-path', logcat_file, LOGCAT_DIR])
[email protected]c11a4682014-04-22 23:04:13645 gs_path = MakeGSPath(options, 'chromium-android/logcat_dumps')
[email protected]6fe4d062014-05-03 00:07:30646 RunCmd([bb_utils.GSUTIL_PATH, 'cp', '-z', 'txt', logcat_file,
647 'gs://%s' % gs_path])
[email protected]c79bc8a2014-04-24 03:39:52648 bb_annotations.PrintLink('logcat dump', '%s/%s' % (GS_AUTH_URL, gs_path))
[email protected]e185b7e82013-01-09 03:49:57649
[email protected]74050272013-07-02 14:02:15650
[email protected]79d3d8d82014-02-05 13:47:04651def RunStackToolSteps(options):
652 """Run stack tool steps.
653
654 Stack tool is run for logcat dump, optionally for ASAN.
655 """
656 bb_annotations.PrintNamedStep('Run stack tool with logcat dump')
[email protected]6fe4d062014-05-03 00:07:30657 logcat_file = os.path.join(CHROME_OUT_DIR, options.target, 'full_log.txt')
[email protected]79d3d8d82014-02-05 13:47:04658 RunCmd([os.path.join(CHROME_SRC_DIR, 'third_party', 'android_platform',
659 'development', 'scripts', 'stack'),
660 '--more-info', logcat_file])
661 if options.asan_symbolize:
662 bb_annotations.PrintNamedStep('Run stack tool for ASAN')
663 RunCmd([
664 os.path.join(CHROME_SRC_DIR, 'build', 'android', 'asan_symbolize.py'),
665 '-l', logcat_file])
666
667
[email protected]74050272013-07-02 14:02:15668def GenerateTestReport(options):
[email protected]b3873892013-07-10 04:57:10669 bb_annotations.PrintNamedStep('test_report')
[email protected]e185b7e82013-01-09 03:49:57670 for report in glob.glob(
[email protected]dc8ec3f2013-09-07 07:18:14671 os.path.join(CHROME_OUT_DIR, options.target, 'test_logs', '*.log')):
[email protected]78af8712013-01-14 10:37:12672 RunCmd(['cat', report])
[email protected]e185b7e82013-01-09 03:49:57673 os.remove(report)
674
675
[email protected]74050272013-07-02 14:02:15676def MainTestWrapper(options):
[email protected]4cf098c2013-08-02 21:08:06677 try:
678 # Spawn logcat monitor
679 SpawnLogcatMonitor()
[email protected]74050272013-07-02 14:02:15680
[email protected]4cf098c2013-08-02 21:08:06681 # Run all device setup steps
682 for _, cmd in GetDeviceSetupStepCmds():
683 cmd(options)
[email protected]74050272013-07-02 14:02:15684
[email protected]4cf098c2013-08-02 21:08:06685 if options.install:
jbudorick7da88de62014-12-03 21:46:03686 for i in options.install:
jbudorickc574b1b2014-12-04 18:21:28687 install_obj = INSTALLABLE_PACKAGES[i]
688 InstallApk(options, install_obj, print_step=True)
[email protected]74050272013-07-02 14:02:15689
[email protected]4cf098c2013-08-02 21:08:06690 if options.test_filter:
691 bb_utils.RunSteps(options.test_filter, GetTestStepCmds(), options)
[email protected]74050272013-07-02 14:02:15692
[email protected]485fb232013-08-22 19:56:33693 if options.coverage_bucket:
[email protected]4e622cee2013-09-17 18:32:12694 coverage_html = GenerateJavaCoverageReport(options)
695 UploadHTML(options, '%s/java' % options.coverage_bucket, coverage_html,
696 'Coverage Report')
[email protected]ec7b2222014-01-16 02:49:15697 shutil.rmtree(coverage_html, ignore_errors=True)
[email protected]485fb232013-08-22 19:56:33698
[email protected]4cf098c2013-08-02 21:08:06699 if options.experimental:
700 RunTestSuites(options, gtest_config.EXPERIMENTAL_TEST_SUITES)
[email protected]74050272013-07-02 14:02:15701
[email protected]4cf098c2013-08-02 21:08:06702 finally:
703 # Run all post test steps
704 LogcatDump(options)
[email protected]79d3d8d82014-02-05 13:47:04705 if not options.disable_stack_tool:
706 RunStackToolSteps(options)
[email protected]4cf098c2013-08-02 21:08:06707 GenerateTestReport(options)
708 # KillHostHeartbeat() has logic to check if heartbeat process is running,
709 # and kills only if it finds the process is running on the host.
710 provision_devices.KillHostHeartbeat()
[email protected]773c4f02014-08-12 19:05:22711 if options.cleanup:
712 shutil.rmtree(os.path.join(CHROME_OUT_DIR, options.target),
713 ignore_errors=True)
[email protected]74050272013-07-02 14:02:15714
715
716def GetDeviceStepsOptParser():
[email protected]c5282752013-06-07 23:14:39717 parser = bb_utils.GetParser()
[email protected]e185b7e82013-01-09 03:49:57718 parser.add_option('--experimental', action='store_true',
719 help='Run experiemental tests')
720 parser.add_option('-f', '--test-filter', metavar='<filter>', default=[],
721 action='append',
722 help=('Run a test suite. Test suites: "%s"' %
723 '", "'.join(VALID_TESTS)))
[email protected]18d59b82013-11-12 09:21:41724 parser.add_option('--gtest-filter',
725 help='Filter for running a subset of tests of a gtest test')
[email protected]e185b7e82013-01-09 03:49:57726 parser.add_option('--asan', action='store_true', help='Run tests with asan.')
jbudorick7da88de62014-12-03 21:46:03727 parser.add_option('--install', metavar='<apk name>', action="append",
[email protected]e185b7e82013-01-09 03:49:57728 help='Install an apk by name')
[email protected]4a3375d2014-01-08 12:56:50729 parser.add_option('--no-reboot', action='store_true',
730 help='Do not reboot devices during provisioning.')
[email protected]485fb232013-08-22 19:56:33731 parser.add_option('--coverage-bucket',
732 help=('Bucket name to store coverage results. Coverage is '
733 'only run if this is set.'))
[email protected]e5d85a72013-10-19 13:44:02734 parser.add_option('--restart-usb', action='store_true',
735 help='Restart usb ports before device status check.')
[email protected]14f139f42013-07-24 18:41:58736 parser.add_option(
737 '--flakiness-server',
[email protected]f049a192013-10-10 01:11:26738 help=('The flakiness dashboard server to which the results should be '
739 'uploaded.'))
[email protected]12f36c82013-03-29 06:21:13740 parser.add_option(
741 '--auto-reconnect', action='store_true',
742 help='Push script to device which restarts adbd on disconnections.')
[email protected]3356038b2014-06-17 02:40:13743 parser.add_option('--skip-wipe', action='store_true',
744 help='Do not wipe devices during provisioning.')
jbudorick9669e5b2015-03-09 16:29:07745 parser.add_option('--disable-location', action='store_true',
746 help='Disable location settings.')
[email protected]74050272013-07-02 14:02:15747 parser.add_option(
748 '--logcat-dump-output',
749 help='The logcat dump output will be "tee"-ed into this file')
[email protected]29826042014-06-06 19:00:05750 # During processing perf bisects, a seperate working directory created under
751 # which builds are produced. Therefore we should look for relevent output
752 # file under this directory.(/b/build/slave/<slave_name>/build/bisect/src/out)
753 parser.add_option(
754 '--chrome-output-dir',
755 help='Chrome output directory to be used while bisecting.')
756
jbudorick0f77e962014-11-19 15:41:29757 parser.add_option('--disable-stack-tool', action='store_true',
[email protected]79d3d8d82014-02-05 13:47:04758 help='Do not run stack tool.')
jbudorick0f77e962014-11-19 15:41:29759 parser.add_option('--asan-symbolize', action='store_true',
[email protected]79d3d8d82014-02-05 13:47:04760 help='Run stack tool for ASAN')
[email protected]773c4f02014-08-12 19:05:22761 parser.add_option('--cleanup', action='store_true',
762 help='Delete out/<target> directory at the end of the run.')
[email protected]74050272013-07-02 14:02:15763 return parser
764
765
766def main(argv):
767 parser = GetDeviceStepsOptParser()
[email protected]e185b7e82013-01-09 03:49:57768 options, args = parser.parse_args(argv[1:])
769
[email protected]e185b7e82013-01-09 03:49:57770 if args:
[email protected]c5282752013-06-07 23:14:39771 return sys.exit('Unused args %s' % args)
[email protected]e185b7e82013-01-09 03:49:57772
773 unknown_tests = set(options.test_filter) - VALID_TESTS
774 if unknown_tests:
[email protected]c5282752013-06-07 23:14:39775 return sys.exit('Unknown tests %s' % list(unknown_tests))
[email protected]e185b7e82013-01-09 03:49:57776
777 setattr(options, 'target', options.factory_properties.get('target', 'Debug'))
[email protected]29826042014-06-06 19:00:05778
779 if options.chrome_output_dir:
780 global CHROME_OUT_DIR
781 global LOGCAT_DIR
782 CHROME_OUT_DIR = options.chrome_output_dir
783 LOGCAT_DIR = os.path.join(CHROME_OUT_DIR, 'logcat')
784
[email protected]485fb232013-08-22 19:56:33785 if options.coverage_bucket:
786 setattr(options, 'coverage_dir',
[email protected]dc8ec3f2013-09-07 07:18:14787 os.path.join(CHROME_OUT_DIR, options.target, 'coverage'))
[email protected]e185b7e82013-01-09 03:49:57788
[email protected]e185b7e82013-01-09 03:49:57789 MainTestWrapper(options)
[email protected]e185b7e82013-01-09 03:49:57790
791
792if __name__ == '__main__':
793 sys.exit(main(sys.argv))