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

Unified Diff: build/android/buildbot/bb_device_steps.py

Issue 239913003: Upload logcat dump to gs instead of stdout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/buildbot/bb_device_steps.py
diff --git a/build/android/buildbot/bb_device_steps.py b/build/android/buildbot/bb_device_steps.py
index 2c220f34de15484d3c212fd554fe344f67ce595c..61927d8b1c1112a6ac46c8382a41e5ed04fd06fd 100755
--- a/build/android/buildbot/bb_device_steps.py
+++ b/build/android/buildbot/bb_device_steps.py
@@ -490,6 +490,13 @@ def GetTestStepCmds():
]
+def MakeGSPath(options, gs_base_dir):
+ revision = _GetRevision(options)
+ bot_id = options.build_properties.get('buildername', 'testing')
+ randhash = hashlib.sha1(str(random.random())).hexdigest()
+ gs_path = '%s/%s/%s/%s' % (gs_base_dir, bot_id, revision, randhash)
+ return gs_path
+
def UploadHTML(options, gs_base_dir, dir_to_upload, link_text,
link_rel_path='index.html', gs_url=GS_URL):
"""Uploads directory at |dir_to_upload| to Google Storage and output a link.
@@ -503,10 +510,7 @@ def UploadHTML(options, gs_base_dir, dir_to_upload, link_text,
link_rel_path: Link path relative to |dir_to_upload|.
gs_url: Google storage URL.
"""
- revision = _GetRevision(options)
- bot_id = options.build_properties.get('buildername', 'testing')
- randhash = hashlib.sha1(str(random.random())).hexdigest()
- gs_path = '%s/%s/%s/%s' % (gs_base_dir, bot_id, revision, randhash)
+ gs_path = MakeGSPath(options, gs_base_dir)
RunCmd([bb_utils.GSUTIL_PATH, 'cp', '-R', dir_to_upload, 'gs://%s' % gs_path])
bb_annotations.PrintLink(link_text,
'%s/%s/%s' % (gs_url, gs_path, link_rel_path))
@@ -531,7 +535,9 @@ def LogcatDump(options):
logcat_file = os.path.join(CHROME_OUT_DIR, options.target, 'full_log')
RunCmd([SrcPath('build' , 'android', 'adb_logcat_printer.py'),
'--output-path', logcat_file, LOGCAT_DIR])
- RunCmd(['cat', logcat_file])
+ gs_path = MakeGSPath(options, 'chromium-android/logcat_dumps')
+ RunCmd([bb_utils.GSUTIL_PATH, 'cp', logcat_file, 'gs://%s' % gs_path])
+ bb_annotations.PrintLink('logcat dump', '%s/%s' % (GS_URL, gs_path))
def RunStackToolSteps(options):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698