| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2013 The Chromium Authors. All rights reserved. | 2 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import os | 6 import os |
| 7 import sys | 7 import sys |
| 8 | 8 |
| 9 import bb_utils | 9 import bb_utils |
| 10 | 10 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 buildbot_report.PrintNamedStep('findbugs') | 85 buildbot_report.PrintNamedStep('findbugs') |
| 86 build_type = [] | 86 build_type = [] |
| 87 if is_release: | 87 if is_release: |
| 88 build_type = ['--release-build'] | 88 build_type = ['--release-build'] |
| 89 RunCmd([SrcPath('build', 'android', 'findbugs_diff.py')] + build_type) | 89 RunCmd([SrcPath('build', 'android', 'findbugs_diff.py')] + build_type) |
| 90 RunCmd([SrcPath( | 90 RunCmd([SrcPath( |
| 91 'tools', 'android', 'findbugs_plugin', 'test', | 91 'tools', 'android', 'findbugs_plugin', 'test', |
| 92 'run_findbugs_plugin_tests.py')] + build_type) | 92 'run_findbugs_plugin_tests.py')] + build_type) |
| 93 | 93 |
| 94 | 94 |
| 95 def BisectPerfRegression(): |
| 96 buildbot_report.PrintNamedStep('Bisect Perf Regression') |
| 97 RunCmd([SrcPath('tools', 'prepare-bisect-perf-regression.py'), |
| 98 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)]) |
| 99 RunCmd([SrcPath('tools', 'run-bisect-perf-regression.py'), |
| 100 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir), |
| 101 '-p', bb_utils.GOMA_DIR]) |
| 102 |
| 103 |
| 95 def main(argv): | 104 def main(argv): |
| 96 parser = bb_utils.GetParser() | 105 parser = bb_utils.GetParser() |
| 97 parser.add_option('--host-tests', help='Comma separated list of host tests.') | 106 parser.add_option('--host-tests', help='Comma separated list of host tests.') |
| 98 parser.add_option('--build-args', default='All', | 107 parser.add_option('--build-args', default='All', |
| 99 help='Comma separated list of build targets.') | 108 help='Comma separated list of build targets.') |
| 100 parser.add_option('--compile', action='store_true', | 109 parser.add_option('--compile', action='store_true', |
| 101 help='Indicate whether a compile step should be run.') | 110 help='Indicate whether a compile step should be run.') |
| 102 parser.add_option('--experimental', action='store_true', | 111 parser.add_option('--experimental', action='store_true', |
| 103 help='Indicate whether to compile experimental targets.') | 112 help='Indicate whether to compile experimental targets.') |
| 104 parser.add_option('--zip-build', action='store_true', | 113 parser.add_option('--zip-build', action='store_true', |
| 105 help='Indicate whether the build should be zipped.') | 114 help='Indicate whether the build should be zipped.') |
| 106 parser.add_option('--extract-build', action='store_true', | 115 parser.add_option('--extract-build', action='store_true', |
| 107 help='Indicate whether a build should be downloaded.') | 116 help='Indicate whether a build should be downloaded.') |
| 117 parser.add_option('--bisect-perf-regression', action='store_true', |
| 118 help='Bisect a perf regression.') |
| 108 | 119 |
| 109 options, args = parser.parse_args(argv[1:]) | 120 options, args = parser.parse_args(argv[1:]) |
| 110 if args: | 121 if args: |
| 111 return sys.exit('Unused args %s' % args) | 122 return sys.exit('Unused args %s' % args) |
| 112 | 123 |
| 113 host_tests = [] | 124 host_tests = [] |
| 114 if options.host_tests: | 125 if options.host_tests: |
| 115 host_tests = options.host_tests.split(',') | 126 host_tests = options.host_tests.split(',') |
| 116 unknown_tests = set(host_tests) - VALID_HOST_TESTS | 127 unknown_tests = set(host_tests) - VALID_HOST_TESTS |
| 117 if unknown_tests: | 128 if unknown_tests: |
| 118 return sys.exit('Unknown host tests %s' % list(unknown_tests)) | 129 return sys.exit('Unknown host tests %s' % list(unknown_tests)) |
| 119 | 130 |
| 120 build_type = options.factory_properties.get('target', 'Debug') | 131 build_type = options.factory_properties.get('target', 'Debug') |
| 121 | 132 |
| 133 if options.bisect_perf_regression: |
| 134 BisectPerfRegression() |
| 122 if options.compile: | 135 if options.compile: |
| 123 if 'check_webview_licenses' in host_tests: | 136 if 'check_webview_licenses' in host_tests: |
| 124 CheckWebViewLicenses() | 137 CheckWebViewLicenses() |
| 125 RunHooks(build_type) | 138 RunHooks(build_type) |
| 126 Compile(build_type, options.build_args.split(',')) | 139 Compile(build_type, options.build_args.split(',')) |
| 127 if options.experimental: | 140 if options.experimental: |
| 128 Compile(build_type, EXPERIMENTAL_TARGETS, True) | 141 Compile(build_type, EXPERIMENTAL_TARGETS, True) |
| 129 if 'findbugs' in host_tests: | 142 if 'findbugs' in host_tests: |
| 130 FindBugs(build_type == 'Release') | 143 FindBugs(build_type == 'Release') |
| 131 if options.zip_build: | 144 if options.zip_build: |
| 132 ZipBuild(bb_utils.EncodeProperties(options)) | 145 ZipBuild(bb_utils.EncodeProperties(options)) |
| 133 if options.extract_build: | 146 if options.extract_build: |
| 134 ExtractBuild(bb_utils.EncodeProperties(options)) | 147 ExtractBuild(bb_utils.EncodeProperties(options)) |
| 135 | 148 |
| 136 | 149 |
| 137 if __name__ == '__main__': | 150 if __name__ == '__main__': |
| 138 sys.exit(main(sys.argv)) | 151 sys.exit(main(sys.argv)) |
| OLD | NEW |