OLD | NEW |
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 import contextlib | 9 import contextlib |
10 import math | 10 import math |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 self.name = bot_name | 148 self.name = bot_name |
149 self.skia_dir = os.path.abspath(os.path.join( | 149 self.skia_dir = os.path.abspath(os.path.join( |
150 os.path.dirname(os.path.realpath(__file__)), | 150 os.path.dirname(os.path.realpath(__file__)), |
151 os.pardir, os.pardir)) | 151 os.pardir, os.pardir)) |
152 self.swarm_out_dir = swarm_out_dir | 152 self.swarm_out_dir = swarm_out_dir |
153 os.chdir(self.skia_dir) | 153 os.chdir(self.skia_dir) |
154 self.build_dir = os.path.abspath(os.path.join(self.skia_dir, os.pardir)) | 154 self.build_dir = os.path.abspath(os.path.join(self.skia_dir, os.pardir)) |
155 self.spec = self.get_bot_spec(bot_name) | 155 self.spec = self.get_bot_spec(bot_name) |
156 self.bot_cfg = self.spec['builder_cfg'] | 156 self.bot_cfg = self.spec['builder_cfg'] |
157 if self.bot_cfg['role'] == 'Build': | 157 if self.bot_cfg['role'] == 'Build': |
158 self.out_dir = os.path.join(swarm_out_dir, 'out') | 158 self.out_dir = swarm_out_dir |
159 else: | 159 else: |
160 self.out_dir = 'out' | 160 self.out_dir = 'out' |
161 self.configuration = self.spec['configuration'] | 161 self.configuration = self.spec['configuration'] |
162 self.default_env = { | 162 self.default_env = { |
163 'SKIA_OUT': self.out_dir, | 163 'SKIA_OUT': self.out_dir, |
164 'BUILDTYPE': self.configuration, | 164 'BUILDTYPE': self.configuration, |
165 'PATH': os.environ['PATH'], | 165 'PATH': os.environ['PATH'], |
166 } | 166 } |
167 self.default_env.update(self.spec['env']) | 167 self.default_env.update(self.spec['env']) |
168 self.build_targets = [str(t) for t in self.spec['build_targets']] | 168 self.build_targets = [str(t) for t in self.spec['build_targets']] |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 | 361 |
362 # See skia:2789. | 362 # See skia:2789. |
363 if ('Valgrind' in self.name and | 363 if ('Valgrind' in self.name and |
364 self.builder_cfg.get('cpu_or_gpu') == 'GPU'): | 364 self.builder_cfg.get('cpu_or_gpu') == 'GPU'): |
365 abandonGpuContext = list(args) | 365 abandonGpuContext = list(args) |
366 abandonGpuContext.append('--abandonGpuContext') | 366 abandonGpuContext.append('--abandonGpuContext') |
367 self.flavor.run(abandonGpuContext) | 367 self.flavor.run(abandonGpuContext) |
368 preAbandonGpuContext = list(args) | 368 preAbandonGpuContext = list(args) |
369 preAbandonGpuContext.append('--preAbandonGpuContext') | 369 preAbandonGpuContext.append('--preAbandonGpuContext') |
370 self.flavor.run(preAbandonGpuContext) | 370 self.flavor.run(preAbandonGpuContext) |
OLD | NEW |