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('Preparing for Bisection') | |
Isaac (away)
2013/06/11 02:06:44
Can you make this a single step instead of two bui
| |
97 RunCmd([SrcPath('tools', 'prepare-bisect-perf-regression.py'), | |
98 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)]) | |
99 buildbot_report.PrintNamedStep('Running Bisection') | |
100 RunCmd([SrcPath('tools', 'run-bisect-perf-regression.py'), | |
101 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir), | |
102 '-p', bb_utils.GOMA_DIR]) | |
103 | |
104 | |
95 def main(argv): | 105 def main(argv): |
96 parser = bb_utils.GetParser() | 106 parser = bb_utils.GetParser() |
97 parser.add_option('--host-tests', help='Comma separated list of host tests.') | 107 parser.add_option('--host-tests', help='Comma separated list of host tests.') |
98 parser.add_option('--build-args', default='All', | 108 parser.add_option('--build-args', default='All', |
99 help='Comma separated list of build targets.') | 109 help='Comma separated list of build targets.') |
100 parser.add_option('--compile', action='store_true', | 110 parser.add_option('--compile', action='store_true', |
101 help='Indicate whether a compile step should be run.') | 111 help='Indicate whether a compile step should be run.') |
102 parser.add_option('--experimental', action='store_true', | 112 parser.add_option('--experimental', action='store_true', |
103 help='Indicate whether to compile experimental targets.') | 113 help='Indicate whether to compile experimental targets.') |
104 parser.add_option('--zip-build', action='store_true', | 114 parser.add_option('--zip-build', action='store_true', |
105 help='Indicate whether the build should be zipped.') | 115 help='Indicate whether the build should be zipped.') |
106 parser.add_option('--extract-build', action='store_true', | 116 parser.add_option('--extract-build', action='store_true', |
107 help='Indicate whether a build should be downloaded.') | 117 help='Indicate whether a build should be downloaded.') |
118 parser.add_option('--bisect-perf-regression', action='store_true', | |
119 help='Bisect a perf regression.') | |
108 | 120 |
109 options, args = parser.parse_args(argv[1:]) | 121 options, args = parser.parse_args(argv[1:]) |
110 if args: | 122 if args: |
111 return sys.exit('Unused args %s' % args) | 123 return sys.exit('Unused args %s' % args) |
112 | 124 |
113 host_tests = [] | 125 host_tests = [] |
114 if options.host_tests: | 126 if options.host_tests: |
115 host_tests = options.host_tests.split(',') | 127 host_tests = options.host_tests.split(',') |
116 unknown_tests = set(host_tests) - VALID_HOST_TESTS | 128 unknown_tests = set(host_tests) - VALID_HOST_TESTS |
117 if unknown_tests: | 129 if unknown_tests: |
118 return sys.exit('Unknown host tests %s' % list(unknown_tests)) | 130 return sys.exit('Unknown host tests %s' % list(unknown_tests)) |
119 | 131 |
120 build_type = options.factory_properties.get('target', 'Debug') | 132 build_type = options.factory_properties.get('target', 'Debug') |
121 | 133 |
134 if options.bisect_perf_regression: | |
135 BisectPerfRegression() | |
122 if options.compile: | 136 if options.compile: |
123 if 'check_webview_licenses' in host_tests: | 137 if 'check_webview_licenses' in host_tests: |
124 CheckWebViewLicenses() | 138 CheckWebViewLicenses() |
125 RunHooks(build_type) | 139 RunHooks(build_type) |
126 Compile(build_type, options.build_args.split(',')) | 140 Compile(build_type, options.build_args.split(',')) |
127 if options.experimental: | 141 if options.experimental: |
128 Compile(build_type, EXPERIMENTAL_TARGETS, True) | 142 Compile(build_type, EXPERIMENTAL_TARGETS, True) |
129 if 'findbugs' in host_tests: | 143 if 'findbugs' in host_tests: |
130 FindBugs(build_type == 'Release') | 144 FindBugs(build_type == 'Release') |
131 if options.zip_build: | 145 if options.zip_build: |
132 ZipBuild(bb_utils.EncodeProperties(options)) | 146 ZipBuild(bb_utils.EncodeProperties(options)) |
133 if options.extract_build: | 147 if options.extract_build: |
134 ExtractBuild(bb_utils.EncodeProperties(options)) | 148 ExtractBuild(bb_utils.EncodeProperties(options)) |
135 | 149 |
136 | 150 |
137 if __name__ == '__main__': | 151 if __name__ == '__main__': |
138 sys.exit(main(sys.argv)) | 152 sys.exit(main(sys.argv)) |
OLD | NEW |