Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: tools/bots/dartium_android.py

Issue 185583003: Archive dartium on android builds (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« tools/bots/bot_utils.py ('K') | « tools/bots/bot_utils.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 Dart and chromium tests on it. 11 Dart and chromium tests on it.
12 """ 12 """
13 13
14 import optparse
15 import os
14 import sys 16 import sys
15 import optparse 17
18 import bot
19 import bot_utils
20
21 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
22 sys.path.append(os.path.join(SCRIPT_DIR, '..'))
23 import utils
24
25
26 APK_LOCATION = 'apks/Chrome.apk'
kustermann 2014/03/06 09:20:36 Please also archive ContentShell.apk (I think it s
ricow1 2014/03/06 11:49:05 We do have it - added
16 27
17 def GetOptionsParser(): 28 def GetOptionsParser():
18 parser = optparse.OptionParser("usage: %prog [options]") 29 parser = optparse.OptionParser("usage: %prog [options]")
19 parser.add_option("--build-products-dir", 30 parser.add_option("--build-products-dir",
20 help="The directory containing the products of the build.") 31 help="The directory containing the products of the build.")
21 return parser 32 return parser
22 33
34 def UploadAPK(options):
35 with bot.BuildStep('Upload apk'):
36 revision = utils.GetSVNRevision()
37 namer = bot_utils.GCSNamer()
38 gsutil = bot_utils.GSUtil()
39 local_path = os.path.join(options.build_products_dir, APK_LOCATION)
40 gs_path = namer.dartium_android_apk_filepath(revision)
41 gsutil.upload(local_path, gs_path)
42 gsutil.setGroupReadACL(gs_path, 'google.com')
43 gsutil.setContentType(gs_path, 'application/vnd.android.package-archive')
44
23 def main(): 45 def main():
24 if sys.platform != 'linux2': 46 if sys.platform != 'linux2':
25 print "This script was only tested on linux. Please run it on linux!" 47 print "This script was only tested on linux. Please run it on linux!"
26 sys.exit(1) 48 sys.exit(1)
27 49
28 parser = GetOptionsParser() 50 parser = GetOptionsParser()
29 (options, args) = parser.parse_args() 51 (options, args) = parser.parse_args()
30 52
31 if not options.build_products_dir: 53 if not options.build_products_dir:
32 die("No build products directory given.") 54 die("No build products directory given.")
kustermann 2014/03/06 09:20:36 Where is "die" comming from? Maybe you need to do
ricow1 2014/03/06 11:49:05 Fixed up, I don't know when this landed
55 UploadAPK(options)
33 sys.exit(0) 56 sys.exit(0)
34 57
35 if __name__ == '__main__': 58 if __name__ == '__main__':
36 main() 59 main()
OLDNEW
« tools/bots/bot_utils.py ('K') | « tools/bots/bot_utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698