| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2014, 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 src tarball generation and debian package generation | 8 Buildbot steps for src tarball generation and debian package generation |
| 9 | 9 |
| 10 Package up the src of the dart repo and create a debian package. | 10 Package up the src of the dart repo and create a debian package. |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 filename = os.path.join(tempdir, 'test.dart') | 68 filename = os.path.join(tempdir, 'test.dart') |
| 69 with open(filename, 'w') as f: | 69 with open(filename, 'w') as f: |
| 70 f.write('import "dart:html";\n\n') | 70 f.write('import "dart:html";\n\n') |
| 71 f.write('void main() {\n') | 71 f.write('void main() {\n') |
| 72 f.write(' print("Hello world");\n') | 72 f.write(' print("Hello world");\n') |
| 73 f.write('}') | 73 f.write('}') |
| 74 return filename | 74 return filename |
| 75 | 75 |
| 76 def Run(args): | 76 def Run(args): |
| 77 print "Running: %s" % ' '.join(args) | 77 print "Running: %s" % ' '.join(args) |
| 78 sys.stdout.flush() |
| 78 bot.RunProcess(args) | 79 bot.RunProcess(args) |
| 79 | 80 |
| 80 def TestInstallation(assume_installed=True): | 81 def TestInstallation(assume_installed=True): |
| 81 paths = ['/usr/bin/dart'] | 82 paths = ['/usr/bin/dart'] |
| 82 for tool in ['dart2js', 'pub', 'dart', 'dartanalyzer']: | 83 for tool in ['dart2js', 'pub', 'dart', 'dartanalyzer']: |
| 83 paths.append(os.path.join('/usr/lib/dart/bin', tool)) | 84 paths.append(os.path.join('/usr/lib/dart/bin', tool)) |
| 84 for path in paths: | 85 for path in paths: |
| 85 if os.path.exists(path): | 86 if os.path.exists(path): |
| 86 if not assume_installed: | 87 if not assume_installed: |
| 87 print 'Assumed not installed, found %s' % path | 88 print 'Assumed not installed, found %s' % path |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 bot_name, _ = bot.GetBotName() | 169 bot_name, _ = bot.GetBotName() |
| 169 channel = bot_utils.GetChannelFromName(bot_name) | 170 channel = bot_utils.GetChannelFromName(bot_name) |
| 170 if channel != bot_utils.Channel.BLEEDING_EDGE: | 171 if channel != bot_utils.Channel.BLEEDING_EDGE: |
| 171 ArchiveArtifacts(tarfile, builddir, channel, build_info.builder_tag) | 172 ArchiveArtifacts(tarfile, builddir, channel, build_info.builder_tag) |
| 172 else: | 173 else: |
| 173 print 'Not uploading artifacts on bleeding edge' | 174 print 'Not uploading artifacts on bleeding edge' |
| 174 | 175 |
| 175 if __name__ == '__main__': | 176 if __name__ == '__main__': |
| 176 # We pass in None for build_step to avoid building the sdk. | 177 # We pass in None for build_step to avoid building the sdk. |
| 177 bot.RunBot(SrcConfig, SrcSteps, build_step=None) | 178 bot.RunBot(SrcConfig, SrcSteps, build_step=None) |
| OLD | NEW |