| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 json | 5 import json |
| 6 import uuid | 6 import uuid |
| 7 | 7 |
| 8 # This is a wrapper class of revision that stores its build path and | 8 # This is a wrapper class of revision that stores its build path and |
| 9 # queries its status. Part of the code are adapted from the RevisionState | 9 # queries its status. Part of the code are adapted from the RevisionState |
| 10 # class from auto-bisect module | 10 # class from auto-bisect module |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 return self._get_platform_gs_prefix() + revision_suffix | 34 return self._get_platform_gs_prefix() + revision_suffix |
| 35 | 35 |
| 36 def _get_platform_gs_prefix(self): # pragma: no cover | 36 def _get_platform_gs_prefix(self): # pragma: no cover |
| 37 bot_name = self.api.m.properties.get('buildername', '') | 37 bot_name = self.api.m.properties.get('buildername', '') |
| 38 if 'win' in bot_name: | 38 if 'win' in bot_name: |
| 39 if any(b in bot_name for b in ['x64', 'gpu']): | 39 if any(b in bot_name for b in ['x64', 'gpu']): |
| 40 return 'gs://%s/Win x64 Builder/full-build-win32_' % self.bucket | 40 return 'gs://%s/Win x64 Builder/full-build-win32_' % self.bucket |
| 41 return 'gs://%s/Win Builder/full-build-win32_' % self.bucket | 41 return 'gs://%s/Win Builder/full-build-win32_' % self.bucket |
| 42 if 'android' in bot_name: | 42 if 'android' in bot_name: |
| 43 if 'nexus9' in bot_name or 'nexus5x' in bot_name: | 43 if 'nexus9' in bot_name or 'nexus5x' in bot_name: |
| 44 return 'gs://%s/android_perf_rel_arm64/full-build-linux_' % self.bucket | 44 return 'gs://%s/Android arm64 Builder/full-build-linux_' % self.bucket |
| 45 return 'gs://%s/android_perf_rel/full-build-linux_' % self.bucket | 45 return 'gs://%s/Android Builder/full-build-linux_' % self.bucket |
| 46 if 'mac' in bot_name: | 46 if 'mac' in bot_name: |
| 47 return 'gs://%s/Mac Builder/full-build-mac_' % self.bucket | 47 return 'gs://%s/Mac Builder/full-build-mac_' % self.bucket |
| 48 return 'gs://%s/Linux Builder/full-build-linux' % self.bucket | 48 return 'gs://%s/Linux Builder/full-build-linux' % self.bucket |
| 49 | 49 |
| 50 def _is_completed(self): | 50 def _is_completed(self): |
| 51 result = self.api.m.buildbucket.get_build( | 51 result = self.api.m.buildbucket.get_build( |
| 52 self.build_id, | 52 self.build_id, |
| 53 step_test_data=lambda: self.api.m.json.test_api.output_stream( | 53 step_test_data=lambda: self.api.m.json.test_api.output_stream( |
| 54 {'build': {'status': 'COMPLETED'}} | 54 {'build': {'status': 'COMPLETED'}} |
| 55 )) | 55 )) |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 import sys | 189 import sys |
| 190 shutil.move(sys.argv[1], sys.argv[2]) | 190 shutil.move(sys.argv[1], sys.argv[2]) |
| 191 """, | 191 """, |
| 192 args=[zip_dir, build_dir]) | 192 args=[zip_dir, build_dir]) |
| 193 else: | 193 else: |
| 194 self.api.m.chromium_tests.download_and_unzip_build( | 194 self.api.m.chromium_tests.download_and_unzip_build( |
| 195 mastername, buildername, update_step, bot_db, | 195 mastername, buildername, update_step, bot_db, |
| 196 build_archive_url=self.build_file_path, | 196 build_archive_url=self.build_file_path, |
| 197 build_revision=self.commit_hash, | 197 build_revision=self.commit_hash, |
| 198 override_bot_type='tester') | 198 override_bot_type='tester') |
| OLD | NEW |