| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 """Base class for all slave-side build steps. """ | 5 """Base class for all slave-side build steps. """ |
| 6 | 6 |
| 7 import config | 7 import config |
| 8 # pylint: disable=W0611 | 8 # pylint: disable=W0611 |
| 9 import flavor_utils | 9 import flavor_utils |
| 10 import imp | 10 import imp |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 GM_EXPECTATIONS_FILENAME = 'expected-results.json' | 44 GM_EXPECTATIONS_FILENAME = 'expected-results.json' |
| 45 GM_IGNORE_FAILURES_FILE = 'ignored-tests.txt' | 45 GM_IGNORE_FAILURES_FILE = 'ignored-tests.txt' |
| 46 | 46 |
| 47 | 47 |
| 48 # multiprocessing.Value doesn't accept boolean types, so we have to use an int. | 48 # multiprocessing.Value doesn't accept boolean types, so we have to use an int. |
| 49 INT_TRUE = 1 | 49 INT_TRUE = 1 |
| 50 INT_FALSE = 0 | 50 INT_FALSE = 0 |
| 51 build_step_stdout_has_written = multiprocessing.Value('i', INT_FALSE) | 51 build_step_stdout_has_written = multiprocessing.Value('i', INT_FALSE) |
| 52 | 52 |
| 53 | 53 |
| 54 # The canned acl to use while copying playback files to Google Storage. | |
| 55 PLAYBACK_CANNED_ACL = 'private' | |
| 56 | |
| 57 | |
| 58 class BuildStepWarning(Exception): | 54 class BuildStepWarning(Exception): |
| 59 pass | 55 pass |
| 60 | 56 |
| 61 | 57 |
| 62 class BuildStepFailure(Exception): | 58 class BuildStepFailure(Exception): |
| 63 pass | 59 pass |
| 64 | 60 |
| 65 | 61 |
| 66 class BuildStepTimeout(Exception): | 62 class BuildStepTimeout(Exception): |
| 67 pass | 63 pass |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 else: | 388 else: |
| 393 raise BuildStepFailure('Build step failed.') | 389 raise BuildStepFailure('Build step failed.') |
| 394 except Exception: | 390 except Exception: |
| 395 print traceback.format_exc() | 391 print traceback.format_exc() |
| 396 if attempt + 1 >= step.attempts: | 392 if attempt + 1 >= step.attempts: |
| 397 raise | 393 raise |
| 398 # pylint: disable=W0212 | 394 # pylint: disable=W0212 |
| 399 step._WaitFunc(attempt) | 395 step._WaitFunc(attempt) |
| 400 attempt += 1 | 396 attempt += 1 |
| 401 print '**** %s, attempt %d ****' % (StepType.__name__, attempt + 1) | 397 print '**** %s, attempt %d ****' % (StepType.__name__, attempt + 1) |
| OLD | NEW |