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

Side by Side Diff: infra/bots/flavor/default_flavor.py

Issue 1813443003: Some fixes for Swarming bots (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Narrow down build products Created 4 years, 9 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
« no previous file with comments | « infra/bots/common.py ('k') | infra/bots/win_toolchain_utils.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2016 Google Inc. 3 # Copyright 2016 Google Inc.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license that can be 5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file. 6 # found in the LICENSE file.
7 7
8 8
9 """Default flavor utils class, used for desktop bots.""" 9 """Default flavor utils class, used for desktop bots."""
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 'step' function, so that commands may be run through ADB. 68 'step' function, so that commands may be run through ADB.
69 """ 69 """
70 def __init__(self, bot_info, *args, **kwargs): 70 def __init__(self, bot_info, *args, **kwargs):
71 self._bot_info = bot_info 71 self._bot_info = bot_info
72 self.chrome_path = os.path.join(self._bot_info.build_dir, 'src') 72 self.chrome_path = os.path.join(self._bot_info.build_dir, 'src')
73 73
74 def run(self, cmd, **kwargs): 74 def run(self, cmd, **kwargs):
75 """Runs a step as appropriate for this flavor.""" 75 """Runs a step as appropriate for this flavor."""
76 path_to_app = os.path.join(self._bot_info.out_dir, 76 path_to_app = os.path.join(self._bot_info.out_dir,
77 self._bot_info.configuration, cmd[0]) 77 self._bot_info.configuration, cmd[0])
78 if (sys.platform == 'linux' and 78 if ('linux' in sys.platform and
79 'x86_64' in self._bot_info.bot_name and 79 'x86_64' in self._bot_info.bot_name and
80 not 'TSAN' in self._bot_info.bot_name): 80 not 'TSAN' in self._bot_info.bot_name):
81 new_cmd = ['catchsegv', path_to_app] 81 new_cmd = ['catchsegv', path_to_app]
82 else: 82 else:
83 if sys.platform == 'win32':
84 path_to_app += '.exe'
83 new_cmd = [path_to_app] 85 new_cmd = [path_to_app]
84 new_cmd.extend(cmd[1:]) 86 new_cmd.extend(cmd[1:])
85 return self._bot_info.run(new_cmd, **kwargs) 87 return self._bot_info.run(new_cmd, **kwargs)
86 88
87 def bootstrap_win_toolchain(self): 89 def bootstrap_win_toolchain(self):
88 """Run bootstrapping script for the Windows toolchain.""" 90 """Run bootstrapping script for the Windows toolchain."""
89 bootstrap_script = os.path.join(self._bot_info.infrabots_dir, 91 bootstrap_script = os.path.join(self._bot_info.infrabots_dir,
90 'bootstrap_win_toolchain_json.py') 92 'bootstrap_win_toolchain_json.py')
91 win_toolchain_json = os.path.join( 93 win_toolchain_json = os.path.join(
92 self._bot_info.build_dir, 'src', 'build', 'win_toolchain.json') 94 self._bot_info.build_dir, 'src', 'build', 'win_toolchain.json')
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 return DeviceDirs( 178 return DeviceDirs(
177 dm_dir=os.path.join(self._bot_info.swarm_out_dir, 'dm'), 179 dm_dir=os.path.join(self._bot_info.swarm_out_dir, 'dm'),
178 perf_data_dir=self._bot_info.perf_data_dir, 180 perf_data_dir=self._bot_info.perf_data_dir,
179 resource_dir=self._bot_info.resource_dir, 181 resource_dir=self._bot_info.resource_dir,
180 images_dir=join('images'), 182 images_dir=join('images'),
181 skp_dir=self._bot_info.local_skp_dir, 183 skp_dir=self._bot_info.local_skp_dir,
182 tmp_dir=join('tmp')) 184 tmp_dir=join('tmp'))
183 185
184 def __repr__(self): 186 def __repr__(self):
185 return '<%s object>' % self.__class__.__name__ # pragma: no cover 187 return '<%s object>' % self.__class__.__name__ # pragma: no cover
OLDNEW
« no previous file with comments | « infra/bots/common.py ('k') | infra/bots/win_toolchain_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698