| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 """ | 6 """ |
| 7 Dartium on Android buildbot steps. | 7 Dartium on Android buildbot steps. |
| 8 | 8 |
| 9 Runs steps after the buildbot builds Dartium on Android, | 9 Runs steps after the buildbot builds Dartium on Android, |
| 10 which should upload the APK to an attached device, and run | 10 which should upload the APK to an attached device, and run |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 CS_LOCATION = 'apks/ContentShell.apk' | 26 CS_LOCATION = 'apks/ContentShell.apk' |
| 27 | 27 |
| 28 def GetOptionsParser(): | 28 def GetOptionsParser(): |
| 29 parser = optparse.OptionParser("usage: %prog [options]") | 29 parser = optparse.OptionParser("usage: %prog [options]") |
| 30 parser.add_option("--build-products-dir", | 30 parser.add_option("--build-products-dir", |
| 31 help="The directory containing the products of the build.") | 31 help="The directory containing the products of the build.") |
| 32 return parser | 32 return parser |
| 33 | 33 |
| 34 | 34 |
| 35 def UploadSetACL(gsutil, local, remote): | 35 def UploadSetACL(gsutil, local, remote): |
| 36 gsutil.upload(local, remote, public=true) | 36 gsutil.upload(local, remote, public=True) |
| 37 | 37 |
| 38 | 38 |
| 39 def UploadAPKs(options): | 39 def UploadAPKs(options): |
| 40 with bot.BuildStep('Upload apk'): | 40 with bot.BuildStep('Upload apk'): |
| 41 revision = utils.GetSVNRevision() | 41 revision = utils.GetSVNRevision() |
| 42 namer = bot_utils.GCSNamer() | 42 namer = bot_utils.GCSNamer() |
| 43 gsutil = bot_utils.GSUtil() | 43 gsutil = bot_utils.GSUtil() |
| 44 | 44 |
| 45 web_link_prefix = 'https://storage.cloud.google.com/' | 45 web_link_prefix = 'https://storage.cloud.google.com/' |
| 46 | 46 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 65 | 65 |
| 66 if not options.build_products_dir: | 66 if not options.build_products_dir: |
| 67 print "No build products directory given." | 67 print "No build products directory given." |
| 68 sys.exit(1) | 68 sys.exit(1) |
| 69 | 69 |
| 70 UploadAPKs(options) | 70 UploadAPKs(options) |
| 71 sys.exit(0) | 71 sys.exit(0) |
| 72 | 72 |
| 73 if __name__ == '__main__': | 73 if __name__ == '__main__': |
| 74 main() | 74 main() |
| OLD | NEW |