Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 """Functions specific to build slaves, shared by several buildbot scripts. | 5 """Functions specific to build slaves, shared by several buildbot scripts. |
| 6 """ | 6 """ |
| 7 | 7 |
| 8 import datetime | 8 import datetime |
| 9 import glob | 9 import glob |
| 10 import os | 10 import os |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 return 0 | 86 return 0 |
| 87 except chromium_utils.ExternalError: | 87 except chromium_utils.ExternalError: |
| 88 return 0 | 88 return 0 |
| 89 | 89 |
| 90 | 90 |
| 91 def GetZipFileNames(build_properties, build_dir, webkit_dir=None, | 91 def GetZipFileNames(build_properties, build_dir, webkit_dir=None, |
| 92 extract=False): | 92 extract=False): |
| 93 base_name = 'full-build-%s' % chromium_utils.PlatformName() | 93 base_name = 'full-build-%s' % chromium_utils.PlatformName() |
| 94 | 94 |
| 95 chromium_revision = SubversionRevision(build_dir) | 95 chromium_revision = SubversionRevision(build_dir) |
| 96 if 'try' in build_properties.get('mastername'): | 96 if 'try' in build_properties.get('mastername', ''): |
|
kjellander_chromium
2012/12/28 16:47:31
Just to avoid an error if an empty build_propertie
| |
| 97 if extract: | 97 if extract: |
| 98 if not build_properties.get('parent_buildnumber'): | 98 if not build_properties.get('parent_buildnumber'): |
| 99 raise Exception('build_props does not have parent data: %s' % | 99 raise Exception('build_props does not have parent data: %s' % |
| 100 build_properties) | 100 build_properties) |
| 101 version_suffix = '_%(parent_buildnumber)s' % build_properties | 101 version_suffix = '_%(parent_buildnumber)s' % build_properties |
| 102 else: | 102 else: |
| 103 version_suffix = '_%(buildnumber)s' % build_properties | 103 version_suffix = '_%(buildnumber)s' % build_properties |
| 104 elif webkit_dir: | 104 elif webkit_dir: |
| 105 webkit_revision = SubversionRevision(webkit_dir) | 105 webkit_revision = SubversionRevision(webkit_dir) |
| 106 version_suffix = '_wk%d_%d' % (webkit_revision, chromium_revision) | 106 version_suffix = '_wk%d_%d' % (webkit_revision, chromium_revision) |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 609 'Platform "%s" is not currently supported.' % sys.platform) | 609 'Platform "%s" is not currently supported.' % sys.platform) |
| 610 | 610 |
| 611 | 611 |
| 612 def WriteLogLines(logname, lines, perf=False): | 612 def WriteLogLines(logname, lines, perf=False): |
| 613 for line in lines: | 613 for line in lines: |
| 614 print '@@@STEP_LOG_LINE@%s@%s@@@' % (logname, line) | 614 print '@@@STEP_LOG_LINE@%s@%s@@@' % (logname, line) |
| 615 if perf: | 615 if perf: |
| 616 print '@@@STEP_LOG_END_PERF@%s@@@' % logname | 616 print '@@@STEP_LOG_END_PERF@%s@@@' % logname |
| 617 else: | 617 else: |
| 618 print '@@@STEP_LOG_END@%s@@@' % logname | 618 print '@@@STEP_LOG_END@%s@@@' % logname |
| OLD | NEW |