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

Side by Side Diff: scripts/slave/recipe_modules/chromium/api.py

Issue 1942903002: build: sanitize non-alpha characters in builder cache path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium.expected/full_chromium_fyi_Linux_Kitchen__kitchen_run_.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import re 5 import re
6 6
7 from recipe_engine import recipe_api 7 from recipe_engine import recipe_api
8 from recipe_engine import util as recipe_util 8 from recipe_engine import util as recipe_util
9 9
10 class TestLauncherFilterFileInputPlaceholder(recipe_util.InputPlaceholder): 10 class TestLauncherFilterFileInputPlaceholder(recipe_util.InputPlaceholder):
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 @property 93 @property
94 def output_dir(self): 94 def output_dir(self):
95 """Return the path to the built executable directory.""" 95 """Return the path to the built executable directory."""
96 # TODO(phajdan.jr): output_dir is deprecated in favor of get_output_dir. 96 # TODO(phajdan.jr): output_dir is deprecated in favor of get_output_dir.
97 return self.c.build_dir.join(self.c.build_config_fs) 97 return self.c.build_dir.join(self.c.build_config_fs)
98 98
99 def get_output_dir(self, target=None): 99 def get_output_dir(self, target=None):
100 """Return the path to the build executable directory.""" 100 """Return the path to the build executable directory."""
101 build_dir = self.c.build_dir 101 build_dir = self.c.build_dir
102 if self.c.use_build_dir_cache: 102 if self.c.use_build_dir_cache:
103 build_dir = build_dir.join(self.m.properties['buildername']) 103 sanitized_buildername = ''.join(c if c.isalnum() else '_'
104 for c in self.m.properties['buildername'])
105 build_dir = build_dir.join(sanitized_buildername)
104 return self.m.path.join(build_dir, target or self.c.build_config_fs) 106 return self.m.path.join(build_dir, target or self.c.build_config_fs)
105 107
106 @property 108 @property
107 def version(self): 109 def version(self):
108 """Returns a version dictionary (after get_version()), e.g. 110 """Returns a version dictionary (after get_version()), e.g.
109 111
110 { 'MAJOR'": '37', 'MINOR': '0', 'BUILD': '2021', 'PATCH': '0' } 112 { 'MAJOR'": '37', 'MINOR': '0', 'BUILD': '2021', 'PATCH': '0' }
111 """ 113 """
112 text = self._version 114 text = self._version
113 output = {} 115 output = {}
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 })) 757 }))
756 758
757 def get_annotate_by_test_name(self, test_name): 759 def get_annotate_by_test_name(self, test_name):
758 return 'graphing' 760 return 'graphing'
759 761
760 def download_lto_plugin(self): 762 def download_lto_plugin(self):
761 return self.m.python( 763 return self.m.python(
762 name='download LTO plugin', 764 name='download LTO plugin',
763 script=self.m.path['checkout'].join( 765 script=self.m.path['checkout'].join(
764 'build', 'download_gold_plugin.py')) 766 'build', 'download_gold_plugin.py'))
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium.expected/full_chromium_fyi_Linux_Kitchen__kitchen_run_.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698