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 |
11 import re | 11 import re |
12 import sys | 12 import sys |
13 import tempfile | 13 import tempfile |
14 import time | 14 import time |
15 | 15 |
16 from common import chromium_utils | 16 from common import chromium_utils |
17 from slave.bootstrap import ImportMasterConfigs # pylint: disable=W0611 | 17 from slave.bootstrap import ImportMasterConfigs # pylint: disable=W0611 |
18 from slave.bootstrap import GetActiveMaster # pylint: disable=W0611 | 18 from common.chromium_utils import GetActiveMaster # pylint: disable=W0611 |
19 import config | 19 import config |
20 from slave import xvfb | 20 from slave import xvfb |
21 | 21 |
22 # These codes used to distinguish true errors from script warnings. | 22 # These codes used to distinguish true errors from script warnings. |
23 ERROR_EXIT_CODE = 1 | 23 ERROR_EXIT_CODE = 1 |
24 WARNING_EXIT_CODE = 88 | 24 WARNING_EXIT_CODE = 88 |
25 | 25 |
26 | 26 |
27 # Local errors. | 27 # Local errors. |
28 class PageHeapError(Exception): | 28 class PageHeapError(Exception): |
(...skipping 580 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=None): | 612 def WriteLogLines(logname, lines, perf=None): |
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@%s@@@' % (logname, perf) | 616 print '@@@STEP_LOG_END_PERF@%s@%s@@@' % (logname, perf) |
617 else: | 617 else: |
618 print '@@@STEP_LOG_END@%s@@@' % logname | 618 print '@@@STEP_LOG_END@%s@@@' % logname |
OLD | NEW |