Chromium Code Reviews| Index: tools/bots/dartium_android.py |
| =================================================================== |
| --- tools/bots/dartium_android.py (revision 33324) |
| +++ tools/bots/dartium_android.py (working copy) |
| @@ -11,15 +11,37 @@ |
| Dart and chromium tests on it. |
| """ |
| +import optparse |
| +import os |
| import sys |
| -import optparse |
| +import bot |
| +import bot_utils |
| + |
| +SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) |
| +sys.path.append(os.path.join(SCRIPT_DIR, '..')) |
| +import utils |
| + |
| + |
| +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
|
| + |
| def GetOptionsParser(): |
| parser = optparse.OptionParser("usage: %prog [options]") |
| parser.add_option("--build-products-dir", |
| help="The directory containing the products of the build.") |
| return parser |
| +def UploadAPK(options): |
| + with bot.BuildStep('Upload apk'): |
| + revision = utils.GetSVNRevision() |
| + namer = bot_utils.GCSNamer() |
| + gsutil = bot_utils.GSUtil() |
| + local_path = os.path.join(options.build_products_dir, APK_LOCATION) |
| + gs_path = namer.dartium_android_apk_filepath(revision) |
| + gsutil.upload(local_path, gs_path) |
| + gsutil.setGroupReadACL(gs_path, 'google.com') |
| + gsutil.setContentType(gs_path, 'application/vnd.android.package-archive') |
| + |
| def main(): |
| if sys.platform != 'linux2': |
| print "This script was only tested on linux. Please run it on linux!" |
| @@ -30,6 +52,7 @@ |
| if not options.build_products_dir: |
| 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
|
| + UploadAPK(options) |
| sys.exit(0) |
| if __name__ == '__main__': |