| OLD | NEW |
| 1 # | 1 # |
| 2 # Copyright 2015 Google Inc. | 2 # Copyright 2015 Google Inc. |
| 3 # | 3 # |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 # | 6 # |
| 7 | 7 |
| 8 #!/usr/bin/env python | 8 #!/usr/bin/env python |
| 9 | 9 |
| 10 usage = ''' | 10 usage = ''' |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 env = {} | 156 env = {} |
| 157 if builder_dict.get('configuration') == 'Coverage': | 157 if builder_dict.get('configuration') == 'Coverage': |
| 158 # We have to use Clang 3.6 because earlier versions do not support the | 158 # We have to use Clang 3.6 because earlier versions do not support the |
| 159 # compile flags we use and 3.7 and 3.8 hit asserts during compilation. | 159 # compile flags we use and 3.7 and 3.8 hit asserts during compilation. |
| 160 env['CC'] = '/usr/bin/clang-3.6' | 160 env['CC'] = '/usr/bin/clang-3.6' |
| 161 env['CXX'] = '/usr/bin/clang++-3.6' | 161 env['CXX'] = '/usr/bin/clang++-3.6' |
| 162 elif builder_dict.get('compiler') == 'Clang': | 162 elif builder_dict.get('compiler') == 'Clang': |
| 163 env['CC'] = '/usr/bin/clang' | 163 env['CC'] = '/usr/bin/clang' |
| 164 env['CXX'] = '/usr/bin/clang++' | 164 env['CXX'] = '/usr/bin/clang++' |
| 165 | 165 |
| 166 # Force Debug mode for Appurify bots so that we don't have to sign the test | |
| 167 # APK. | |
| 168 # TODO(borenet): Remove this once able. | |
| 169 if builder_dict.get('extra_config') == 'Appurify': | |
| 170 env['BUILDTYPE'] = CONFIG_DEBUG | |
| 171 | |
| 172 return env | 166 return env |
| 173 | 167 |
| 174 | 168 |
| 175 cov_skip.extend([lineno(), lineno() + 1]) | 169 cov_skip.extend([lineno(), lineno() + 1]) |
| 176 def build_targets_from_builder_dict(builder_dict): | 170 def build_targets_from_builder_dict(builder_dict): |
| 177 """Return a list of targets to build, depending on the builder type.""" | 171 """Return a list of targets to build, depending on the builder type.""" |
| 178 if builder_dict['role'] in ('Test', 'Perf') and builder_dict['os'] == 'iOS': | 172 if builder_dict['role'] in ('Test', 'Perf') and builder_dict['os'] == 'iOS': |
| 179 return ['iOSShell'] | 173 return ['iOSShell'] |
| 180 elif builder_dict['role'] == builder_name_schema.BUILDER_ROLE_TEST: | 174 elif builder_dict['role'] == builder_name_schema.BUILDER_ROLE_TEST: |
| 181 t = ['dm'] | 175 t = ['dm'] |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 if len(sys.argv) == 2 and sys.argv[1] == 'test': | 340 if len(sys.argv) == 2 and sys.argv[1] == 'test': |
| 347 self_test() | 341 self_test() |
| 348 sys.exit(0) | 342 sys.exit(0) |
| 349 | 343 |
| 350 if len(sys.argv) != 3: | 344 if len(sys.argv) != 3: |
| 351 print usage | 345 print usage |
| 352 sys.exit(1) | 346 sys.exit(1) |
| 353 | 347 |
| 354 with open(sys.argv[1], 'w') as out: | 348 with open(sys.argv[1], 'w') as out: |
| 355 json.dump(get_builder_spec(sys.argv[2]), out) | 349 json.dump(get_builder_spec(sys.argv[2]), out) |
| OLD | NEW |