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

Unified Diff: scripts/slave/recipes/chromium_mojo.py

Issue 1412173008: Add simple build archiving for Mandoline binaries. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Use api.file.read and exec() instead of execfile for test_data. Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium_mojo.expected/full_chromium_mojo_Chromium_Mojo_Android.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipes/chromium_mojo.py
diff --git a/scripts/slave/recipes/chromium_mojo.py b/scripts/slave/recipes/chromium_mojo.py
index a064a82bc74583d429703633d853e46ba6af54df..034935e52240af857d2ff690181bffdb3f2dd4c0 100644
--- a/scripts/slave/recipes/chromium_mojo.py
+++ b/scripts/slave/recipes/chromium_mojo.py
@@ -11,6 +11,7 @@ DEPS = [
'bot_update',
'chromium',
'chromium_android',
+ 'file',
'gsutil',
'raw_io',
'path',
@@ -124,16 +125,24 @@ def _UploadMandolineToGoogleStorage(api):
result.presentation.logs['ls result stdout'] = [result.stdout or '']
url = '%s/%s' % (url, api.chromium.c.TARGET_PLATFORM)
- api.step('upload_mandoline', None)
if result.stdout and url in result.stdout:
- api.step.active_result.presentation.step_text = 'Skipping; already uploaded'
+ api.step('skipping mandoline upload: release already exits', None)
return
- path = '%s/%s' % (version, api.chromium.c.TARGET_PLATFORM)
- name = 'Mandoline.apk'
- local_path = api.chromium.output_dir.join('apks', name)
- remote_path = '%s/%s' % (path, name)
- api.gsutil.upload(local_path, bucket, remote_path)
+ # Read a limited FILES.cfg file-list format, uploading each applicable entry.
+ files = api.path['checkout'].join('mandoline', 'tools', 'data', 'FILES.cfg')
+ test_data = 'FILES=[{\'filepath\': \'foo\', \'platforms\': [\'linux\'],},]'
+ files_data = api.file.read('read FILES.cfg', files, test_data=test_data)
+ execution_globals = {}
+ exec(files_data, execution_globals)
+ gs_path = '%s/%s' % (version, api.chromium.c.TARGET_PLATFORM)
+ for file_dictionary in execution_globals['FILES']:
+ if api.chromium.c.TARGET_PLATFORM in file_dictionary['platforms']:
+ file_path = file_dictionary['filepath']
+ local_path = api.chromium.output_dir.join(file_path)
+ remote_path = '%s/%s' % (gs_path, file_path)
+ args = ['-r'] if file_dictionary.get('directory', False) else []
+ api.gsutil.upload(local_path, bucket, remote_path, args=args)
@recipe_api.composite_step
@@ -216,9 +225,7 @@ def RunSteps(api):
_RunPerfTests(api, bot_config['perf_test_info'])
else:
_RunUnitAndAppTests(api)
- # TODO(msw): Upload binaries on Windows and Linux.
- if api.chromium.c.TARGET_PLATFORM == 'android':
- _UploadMandolineToGoogleStorage(api)
+ _UploadMandolineToGoogleStorage(api)
def GenTests(api):
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium_mojo.expected/full_chromium_mojo_Chromium_Mojo_Android.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698