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 = swarm_out_dir | 158 self.out_dir = os.path.join(swarm_out_dir, 'out') |
159 else: | 159 else: |
160 self.out_dir = os.path.join(self.skia_dir, 'out', self.name) | 160 self.out_dir = os.path.join(os.pardir, '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']] |
169 self.is_trybot = self.bot_cfg['is_trybot'] | 169 self.is_trybot = self.bot_cfg['is_trybot'] |
170 self.upload_dm_results = self.spec['upload_dm_results'] | 170 self.upload_dm_results = self.spec['upload_dm_results'] |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 self.flavor.run(abandonGpuContext, env=self.default_env) | 447 self.flavor.run(abandonGpuContext, env=self.default_env) |
448 | 448 |
449 # Copy results to host. | 449 # Copy results to host. |
450 if self.upload_perf_results: | 450 if self.upload_perf_results: |
451 if not os.path.exists(self.perf_data_dir): | 451 if not os.path.exists(self.perf_data_dir): |
452 os.makedirs(self.perf_data_dir) | 452 os.makedirs(self.perf_data_dir) |
453 self.flavor.copy_directory_contents_to_host( | 453 self.flavor.copy_directory_contents_to_host( |
454 self.device_dirs.perf_data_dir, self.perf_data_dir) | 454 self.device_dirs.perf_data_dir, self.perf_data_dir) |
455 | 455 |
456 self.flavor.cleanup_steps() | 456 self.flavor.cleanup_steps() |
OLD | NEW |