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 import bb_annotations | 10 import bb_annotations |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 | 74 |
75 def ExtractBuild(options): | 75 def ExtractBuild(options): |
76 bb_annotations.PrintNamedStep('extract_build') | 76 bb_annotations.PrintNamedStep('extract_build') |
77 RunCmd([os.path.join(SLAVE_SCRIPTS_DIR, 'extract_build.py')] | 77 RunCmd([os.path.join(SLAVE_SCRIPTS_DIR, 'extract_build.py')] |
78 + bb_utils.EncodeProperties(options), | 78 + bb_utils.EncodeProperties(options), |
79 warning_code=1, cwd=DIR_BUILD_ROOT) | 79 warning_code=1, cwd=DIR_BUILD_ROOT) |
80 | 80 |
81 | 81 |
82 def FindBugs(options): | 82 def FindBugs(options): |
83 _ = options # keeps the linter and findbugs happy, parameter is not used | |
84 bb_annotations.PrintNamedStep('findbugs') | 83 bb_annotations.PrintNamedStep('findbugs') |
85 RunCmd([SrcPath('build', 'android', 'findbugs_diff.py')]) | 84 build_type = [] |
| 85 if options.target == 'Release': |
| 86 build_type = ['--release-build'] |
| 87 RunCmd([SrcPath('build', 'android', 'findbugs_diff.py')] + build_type) |
86 RunCmd([SrcPath( | 88 RunCmd([SrcPath( |
87 'tools', 'android', 'findbugs_plugin', 'test', | 89 'tools', 'android', 'findbugs_plugin', 'test', |
88 'run_findbugs_plugin_tests.py')]) | 90 'run_findbugs_plugin_tests.py')] + build_type) |
89 | 91 |
90 | 92 |
91 def BisectPerfRegression(options): | 93 def BisectPerfRegression(options): |
92 args = [] | 94 args = [] |
93 if options.extra_src: | 95 if options.extra_src: |
94 args = ['--extra_src', options.extra_src] | 96 args = ['--extra_src', options.extra_src] |
95 RunCmd([SrcPath('tools', 'prepare-bisect-perf-regression.py'), | 97 RunCmd([SrcPath('tools', 'prepare-bisect-perf-regression.py'), |
96 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)]) | 98 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)]) |
97 RunCmd([SrcPath('tools', 'run-bisect-perf-regression.py'), | 99 RunCmd([SrcPath('tools', 'run-bisect-perf-regression.py'), |
98 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)] + args) | 100 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)] + args) |
(...skipping 26 matching lines...) Expand all Loading... |
125 | 127 |
126 def main(argv): | 128 def main(argv): |
127 parser = GetHostStepsOptParser() | 129 parser = GetHostStepsOptParser() |
128 options, args = parser.parse_args(argv[1:]) | 130 options, args = parser.parse_args(argv[1:]) |
129 if args: | 131 if args: |
130 return sys.exit('Unused args %s' % args) | 132 return sys.exit('Unused args %s' % args) |
131 | 133 |
132 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 134 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
133 setattr(options, 'extra_src', | 135 setattr(options, 'extra_src', |
134 options.factory_properties.get('extra_src', '')) | 136 options.factory_properties.get('extra_src', '')) |
135 constants.SetBuildType(options.target) | |
136 | 137 |
137 if options.steps: | 138 if options.steps: |
138 bb_utils.RunSteps(options.steps.split(','), GetHostStepCmds(), options) | 139 bb_utils.RunSteps(options.steps.split(','), GetHostStepCmds(), options) |
139 | 140 |
140 | 141 |
141 if __name__ == '__main__': | 142 if __name__ == '__main__': |
142 sys.exit(main(sys.argv)) | 143 sys.exit(main(sys.argv)) |
OLD | NEW |