From b234618b7d839398ba67458bd5fc2cf3d2dd0650 Mon Sep 17 00:00:00 2001 From: "dpranke@chromium.org" Date: Wed, 18 Sep 2013 05:13:10 +0000 Subject: [PATCH] Escape the builder name when archiving the layout test results. Failing to do so leads to incorrect URLs being linked to in the test results :). TBR=ilevy@chromium.org BUG=293928 Review URL: https://codereview.chromium.org/23496069 git-svn-id: http://src.chromium.org/svn/trunk/src/build@223803 4ff67af0-8c30-449e-8e8b-ad334ec8d88c --- android/buildbot/bb_device_steps.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/android/buildbot/bb_device_steps.py b/android/buildbot/bb_device_steps.py index b8398b1d3..d47fb9951 100755 --- a/android/buildbot/bb_device_steps.py +++ b/android/buildbot/bb_device_steps.py @@ -9,6 +9,7 @@ import hashlib import multiprocessing import os import random +import re import shutil import sys @@ -254,11 +255,10 @@ def RunWebkitLayoutTests(options): builder_name = options.build_properties.get('buildername', '') build_number = str(options.build_properties.get('buildnumber', '')) bb_annotations.PrintLink('results', - '%s/%s/%s/layout-test-results/results.html' % (base, builder_name, - build_number)) - bb_annotations.PrintLink('(zip)', - '%s/%s/%s/layout-test-results.zip' % (base, builder_name, - build_number)) + '%s/%s/%s/layout-test-results/results.html' % ( + base, EscapeBuilderName(builder_name), build_number)) + bb_annotations.PrintLink('(zip)', '%s/%s/%s/layout-test-results.zip' % ( + base, EscapeBuilderName(builder_name), build_number)) gs_bucket = 'gs://chromium-layout-test-archives' RunCmd([os.path.join(SLAVE_SCRIPTS_DIR, 'chromium', 'archive_layout_test_results.py'), @@ -269,6 +269,10 @@ def RunWebkitLayoutTests(options): '--gs-bucket', gs_bucket]) +def EscapeBuilderName(builder_name): + return re.sub('[ ()]', '_', builder_name) + + def SpawnLogcatMonitor(): shutil.rmtree(LOGCAT_DIR, ignore_errors=True) bb_utils.SpawnCmd([