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 22 matching lines...) Expand all Loading... |
33 return parser | 33 return parser |
34 | 34 |
35 | 35 |
36 def UploadSetACL(gsutil, local, remote): | 36 def UploadSetACL(gsutil, local, remote): |
37 gsutil.upload(local, remote, public=True) | 37 gsutil.upload(local, remote, public=True) |
38 | 38 |
39 | 39 |
40 def UploadAPKs(options): | 40 def UploadAPKs(options): |
41 with bot.BuildStep('Upload apk'): | 41 with bot.BuildStep('Upload apk'): |
42 revision = utils.GetSVNRevision() | 42 revision = utils.GetSVNRevision() |
43 namer = bot_utils.GCSNamer() | 43 bot_name = os.environ.get("BUILDBOT_BUILDERNAME") |
| 44 channel = bot_utils.GetChannelFromName(bot_name) |
| 45 namer = bot_utils.GCSNamer(channel=channel) |
44 gsutil = bot_utils.GSUtil() | 46 gsutil = bot_utils.GSUtil() |
45 | 47 |
46 web_link_prefix = 'https://storage.cloud.google.com/' | 48 web_link_prefix = 'https://storage.cloud.google.com/' |
47 | 49 |
48 # Archive content shell | 50 # Archive content shell |
49 local = os.path.join(options.build_products_dir, CS_LOCATION) | 51 local = os.path.join(options.build_products_dir, CS_LOCATION) |
50 # TODO(whesse): pass in arch and mode from reciepe | 52 # TODO(whesse): pass in arch and mode from reciepe |
51 remote = namer.dartium_android_apk_filepath(revision, | 53 remote = namer.dartium_android_apk_filepath(revision, |
52 'content_shell-android', | 54 'content_shell-android', |
53 'arm', | 55 'arm', |
(...skipping 20 matching lines...) Expand all Loading... |
74 if not options.build_products_dir: | 76 if not options.build_products_dir: |
75 print "No build products directory given." | 77 print "No build products directory given." |
76 sys.exit(1) | 78 sys.exit(1) |
77 | 79 |
78 UploadAPKs(options) | 80 UploadAPKs(options) |
79 RunContentShellTests(options) | 81 RunContentShellTests(options) |
80 sys.exit(0) | 82 sys.exit(0) |
81 | 83 |
82 if __name__ == '__main__': | 84 if __name__ == '__main__': |
83 main() | 85 main() |
OLD | NEW |