| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 | 6 |
| 7 """ | 7 """ |
| 8 Buildbot steps for building Dart SDK with Fletch-specific patches. | 8 Buildbot steps for building Dart SDK with Dartino-specific patches. |
| 9 """ | 9 """ |
| 10 import os | 10 import os |
| 11 import sys | 11 import sys |
| 12 # We run this as third_party/fletch/tools/bots/sdk_fletch_patched.py | 12 # We run this as third_party/dartino/tools/bots/sdk_dartino_patched.py |
| 13 sys.path.insert(0, os.path.join('tools', 'bots')) | 13 sys.path.insert(0, os.path.join('tools', 'bots')) |
| 14 | 14 |
| 15 import bot | 15 import bot |
| 16 import bot_utils | 16 import bot_utils |
| 17 import re | 17 import re |
| 18 | 18 |
| 19 utils = bot_utils.GetUtils() | 19 utils = bot_utils.GetUtils() |
| 20 | 20 |
| 21 PATCHED_BUILDER = r'dart-sdk-fletch-patched-(linux|mac)-(x64|arm)' | 21 PATCHED_BUILDER = r'dart-sdk-dartino-patched-(linux|mac)-(x64|arm)' |
| 22 | 22 |
| 23 def BuildConfig(name, is_buildbot): | 23 def BuildConfig(name, is_buildbot): |
| 24 """Returns info for the current buildbot.""" | 24 """Returns info for the current buildbot.""" |
| 25 pattern = re.match(PATCHED_BUILDER, name) | 25 pattern = re.match(PATCHED_BUILDER, name) |
| 26 if pattern: | 26 if pattern: |
| 27 system = pattern.group(1) | 27 system = pattern.group(1) |
| 28 arch = pattern.group(2) | 28 arch = pattern.group(2) |
| 29 if system == 'mac': system = 'macos' | 29 if system == 'mac': system = 'macos' |
| 30 return bot.BuildInfo('none', 'none', 'release', system, arch=arch) | 30 return bot.BuildInfo('none', 'none', 'release', system, arch=arch) |
| 31 return None | 31 return None |
| (...skipping 12 matching lines...) Expand all Loading... |
| 44 with bot.BuildStep('Upload VM to GCS'): | 44 with bot.BuildStep('Upload VM to GCS'): |
| 45 # The build binary in the sdk is stripped, the one in build_root is not. | 45 # The build binary in the sdk is stripped, the one in build_root is not. |
| 46 # We archive the unstripped binaries in case we need to debug a vm crash. | 46 # We archive the unstripped binaries in case we need to debug a vm crash. |
| 47 sdk_bin_path = utils.GetBuildSdkBin(build_info.system, | 47 sdk_bin_path = utils.GetBuildSdkBin(build_info.system, |
| 48 build_info.mode, | 48 build_info.mode, |
| 49 build_info.arch) | 49 build_info.arch) |
| 50 build_root = utils.GetBuildRoot(build_info.system, | 50 build_root = utils.GetBuildRoot(build_info.system, |
| 51 build_info.mode, | 51 build_info.mode, |
| 52 build_info.arch) | 52 build_info.arch) |
| 53 revision = utils.GetGitRevision() | 53 revision = utils.GetGitRevision() |
| 54 archive_path = 'fletch-archive/patched_dart_sdks/%s/' % revision | 54 archive_path = 'dartino-archive/patched_dart_sdks/%s/' % revision |
| 55 stripped_name = '%sdart-vm-%s-%s' % (archive_path, build_info.arch, | 55 stripped_name = '%sdart-vm-%s-%s' % (archive_path, build_info.arch, |
| 56 build_info.system) | 56 build_info.system) |
| 57 unstripped_name = '%sdart-vm-%s-%s-symbols' % (archive_path, | 57 unstripped_name = '%sdart-vm-%s-%s-symbols' % (archive_path, |
| 58 build_info.arch, | 58 build_info.arch, |
| 59 build_info.system) | 59 build_info.system) |
| 60 | 60 |
| 61 unstripped_vm = os.path.join(build_root, 'dart') | 61 unstripped_vm = os.path.join(build_root, 'dart') |
| 62 stripped_vm = os.path.join(sdk_bin_path, 'dart') | 62 stripped_vm = os.path.join(sdk_bin_path, 'dart') |
| 63 Archive(stripped_name, stripped_vm, 'stripped') | 63 Archive(stripped_name, stripped_vm, 'stripped') |
| 64 Archive(unstripped_name, unstripped_vm, 'unstripped') | 64 Archive(unstripped_name, unstripped_vm, 'unstripped') |
| 65 | 65 |
| 66 if __name__ == '__main__': | 66 if __name__ == '__main__': |
| 67 bot.RunBot(BuildConfig, BuildSteps) | 67 bot.RunBot(BuildConfig, BuildSteps) |
| OLD | NEW |