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

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

Issue 250153003: Fix gs url in logcat dump, and set content type to text/plain (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove space as advised by gsutil docs 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 61927d8b1c1112a6ac46c8382a41e5ed04fd06fd..bfabd0a2696479070de963029e4152938f81b2ee 100755
--- a/build/android/buildbot/bb_device_steps.py
+++ b/build/android/buildbot/bb_device_steps.py
@@ -35,6 +35,7 @@ import errors
SLAVE_SCRIPTS_DIR = os.path.join(bb_utils.BB_BUILD_DIR, 'scripts', 'slave')
LOGCAT_DIR = os.path.join(bb_utils.CHROME_OUT_DIR, 'logcat')
GS_URL = 'https://storage.googleapis.com'
+GS_AUTH_URL = 'https://storage.cloud.google.com'
# Describes an instrumation test suite:
# test: Name of test we're running.
@@ -495,6 +496,8 @@ def MakeGSPath(options, gs_base_dir):
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)
+ # remove double slashes, happens with blank revisions and confuses gsutil
+ gs_path = re.sub('/+', '/', gs_path)
return gs_path
def UploadHTML(options, gs_base_dir, dir_to_upload, link_text,
@@ -536,8 +539,9 @@ def LogcatDump(options):
RunCmd([SrcPath('build' , 'android', 'adb_logcat_printer.py'),
'--output-path', logcat_file, LOGCAT_DIR])
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))
+ RunCmd([bb_utils.GSUTIL_PATH, '-h', 'Content-Type:text/plain',
+ 'cp', logcat_file, 'gs://%s' % gs_path])
+ bb_annotations.PrintLink('logcat dump', '%s/%s' % (GS_AUTH_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