| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 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 import collections | 7 import collections |
| 8 import copy | 8 import copy |
| 9 import json | 9 import json |
| 10 import os | 10 import os |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 envsetup_cmd + ' >&2; python build/android/buildbot/env_to_json.py'], | 61 envsetup_cmd + ' >&2; python build/android/buildbot/env_to_json.py'], |
| 62 stdout=subprocess.PIPE, stderr=subprocess.PIPE, | 62 stdout=subprocess.PIPE, stderr=subprocess.PIPE, |
| 63 cwd=bb_utils.CHROME_SRC, env=init_env) | 63 cwd=bb_utils.CHROME_SRC, env=init_env) |
| 64 json_env, envsetup_output = proc.communicate() | 64 json_env, envsetup_output = proc.communicate() |
| 65 if proc.returncode != 0: | 65 if proc.returncode != 0: |
| 66 print >> sys.stderr, 'FATAL Failure in envsetup.' | 66 print >> sys.stderr, 'FATAL Failure in envsetup.' |
| 67 print >> sys.stderr, envsetup_output | 67 print >> sys.stderr, envsetup_output |
| 68 sys.exit(1) | 68 sys.exit(1) |
| 69 env = json.loads(json_env) | 69 env = json.loads(json_env) |
| 70 env['GYP_DEFINES'] = env.get('GYP_DEFINES', '') + \ | 70 env['GYP_DEFINES'] = env.get('GYP_DEFINES', '') + \ |
| 71 ' fastbuild=1 use_goma=1 gomadir=%s' % bb_utils.GOMA_DIR | 71 ' OS=android fastbuild=1 use_goma=1 gomadir=%s' % bb_utils.GOMA_DIR |
| 72 if host_obj.target_arch: | 72 if host_obj.target_arch: |
| 73 env['GYP_DEFINES'] += ' target_arch=%s' % host_obj.target_arch | 73 env['GYP_DEFINES'] += ' target_arch=%s' % host_obj.target_arch |
| 74 extra_gyp = host_obj.extra_gyp_defines | 74 extra_gyp = host_obj.extra_gyp_defines |
| 75 if extra_gyp: | 75 if extra_gyp: |
| 76 env['GYP_DEFINES'] += ' %s' % extra_gyp | 76 env['GYP_DEFINES'] += ' %s' % extra_gyp |
| 77 if re.search('(asan|clang)=1', extra_gyp): | 77 if re.search('(asan|clang)=1', extra_gyp): |
| 78 env.pop('CXX_target', None) | 78 env.pop('CXX_target', None) |
| 79 | 79 |
| 80 # Bots checkout chrome in /b/build/slave/<name>/build/src | 80 # Bots checkout chrome in /b/build/slave/<name>/build/src |
| 81 build_internal_android = os.path.abspath(os.path.join( | 81 build_internal_android = os.path.abspath(os.path.join( |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 for command in commands: | 284 for command in commands: |
| 285 print 'Will run: ', bb_utils.CommandToString(command) | 285 print 'Will run: ', bb_utils.CommandToString(command) |
| 286 print | 286 print |
| 287 | 287 |
| 288 env = GetEnvironment(bot_config.host_obj, options.testing) | 288 env = GetEnvironment(bot_config.host_obj, options.testing) |
| 289 return RunBotCommands(options, commands, env) | 289 return RunBotCommands(options, commands, env) |
| 290 | 290 |
| 291 | 291 |
| 292 if __name__ == '__main__': | 292 if __name__ == '__main__': |
| 293 sys.exit(main(sys.argv)) | 293 sys.exit(main(sys.argv)) |
| OLD | NEW |