| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 def BisectPerfRegression(_): | 98 def BisectPerfRegression(_): |
| 99 buildbot_report.PrintNamedStep('Bisect Perf Regression') | 99 buildbot_report.PrintNamedStep('Bisect Perf Regression') |
| 100 RunCmd([SrcPath('tools', 'prepare-bisect-perf-regression.py'), | 100 RunCmd([SrcPath('tools', 'prepare-bisect-perf-regression.py'), |
| 101 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)]) | 101 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)]) |
| 102 RunCmd([SrcPath('tools', 'run-bisect-perf-regression.py'), | 102 RunCmd([SrcPath('tools', 'run-bisect-perf-regression.py'), |
| 103 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir), | 103 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir), |
| 104 '-p', bb_utils.GOMA_DIR]) | 104 '-p', bb_utils.GOMA_DIR]) |
| 105 | 105 |
| 106 | 106 |
| 107 def GetHostSteps(): | 107 def GetHostStepCmds(): |
| 108 return [ | 108 return [ |
| 109 ('compile', Compile), | 109 ('compile', Compile), |
| 110 ('extract_build', ExtractBuild), | 110 ('extract_build', ExtractBuild), |
| 111 ('check_webview_licenses', CheckWebViewLicenses), | 111 ('check_webview_licenses', CheckWebViewLicenses), |
| 112 ('bisect_perf_regression', BisectPerfRegression), | 112 ('bisect_perf_regression', BisectPerfRegression), |
| 113 ('findbugs', FindBugs), | 113 ('findbugs', FindBugs), |
| 114 ('zip_build', ZipBuild) | 114 ('zip_build', ZipBuild) |
| 115 ] | 115 ] |
| 116 | 116 |
| 117 | 117 |
| 118 def main(argv): | 118 def GetHostStepsOptParser(): |
| 119 parser = bb_utils.GetParser() | 119 parser = bb_utils.GetParser() |
| 120 parser.add_option('--steps', help='Comma separated list of host tests.') | 120 parser.add_option('--steps', help='Comma separated list of host tests.') |
| 121 parser.add_option('--build-targets', default='All', | 121 parser.add_option('--build-targets', default='All', |
| 122 help='Comma separated list of build targets.') | 122 help='Comma separated list of build targets.') |
| 123 parser.add_option('--experimental', action='store_true', | 123 parser.add_option('--experimental', action='store_true', |
| 124 help='Indicate whether to compile experimental targets.') | 124 help='Indicate whether to compile experimental targets.') |
| 125 | 125 |
| 126 return parser |
| 127 |
| 128 |
| 129 def main(argv): |
| 130 parser = GetHostStepsOptParser() |
| 126 options, args = parser.parse_args(argv[1:]) | 131 options, args = parser.parse_args(argv[1:]) |
| 127 if args: | 132 if args: |
| 128 return sys.exit('Unused args %s' % args) | 133 return sys.exit('Unused args %s' % args) |
| 129 | 134 |
| 130 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 135 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
| 131 | 136 |
| 132 bb_utils.RunSteps(GetHostSteps(), options) | 137 if options.steps: |
| 138 bb_utils.RunSteps(options.steps.split(','), GetHostStepCmds(), options) |
| 133 | 139 |
| 134 | 140 |
| 135 if __name__ == '__main__': | 141 if __name__ == '__main__': |
| 136 sys.exit(main(sys.argv)) | 142 sys.exit(main(sys.argv)) |
| OLD | NEW |