Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(503)

Side by Side Diff: slave/skia_slave_scripts/build_step.py

Issue 344183004: Use new common utils where possible. (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 import multiprocessing 11 import multiprocessing
12 import os 12 import os
13 import shlex 13 import shlex
14 import signal 14 import signal
15 import subprocess 15 import subprocess
16 import sys 16 import sys
17 import time 17 import time
18 import traceback 18 import traceback
19 19
20 from playback_dirs import LocalSkpPlaybackDirs 20 from playback_dirs import LocalSkpPlaybackDirs
21 from playback_dirs import StorageSkpPlaybackDirs 21 from playback_dirs import StorageSkpPlaybackDirs
22 from utils import misc
23 22
23 BUILDBOT_PATH = os.path.realpath(os.path.join(
24 os.path.dirname(os.path.abspath(__file__)), os.pardir, os.pardir))
24 25
25 # Add important directories to the PYTHONPATH 26 # Add important directories to the PYTHONPATH
26 sys.path.append(os.path.join(misc.BUILDBOT_PATH, 'site_config')) 27 sys.path.append(os.path.join(BUILDBOT_PATH))
27 sys.path.append(os.path.join(misc.BUILDBOT_PATH, 'master')) 28 sys.path.append(os.path.join(BUILDBOT_PATH, 'site_config'))
29 sys.path.append(os.path.join(BUILDBOT_PATH, 'master'))
30 sys.path.insert(0, os.path.join(BUILDBOT_PATH, 'common'))
28 31
29 import builder_name_schema 32 import builder_name_schema
30 import slave_hosts_cfg 33 import slave_hosts_cfg
31 import slaves_cfg 34 import slaves_cfg
32 35
36 from py.utils import misc
37
38
33 DEFAULT_TIMEOUT = 4800 39 DEFAULT_TIMEOUT = 4800
34 DEFAULT_NO_OUTPUT_TIMEOUT = 3600 40 DEFAULT_NO_OUTPUT_TIMEOUT = 3600
35 DEFAULT_NUM_CORES = 2 41 DEFAULT_NUM_CORES = 2
36 42
37 43
38 GM_EXPECTATIONS_FILENAME = 'expected-results.json' 44 GM_EXPECTATIONS_FILENAME = 'expected-results.json'
39 GM_IGNORE_FAILURES_FILE = 'ignored-tests.txt' 45 GM_IGNORE_FAILURES_FILE = 'ignored-tests.txt'
40 46
41 47
42 # 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.
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 else: 392 else:
387 raise BuildStepFailure('Build step failed.') 393 raise BuildStepFailure('Build step failed.')
388 except Exception: 394 except Exception:
389 print traceback.format_exc() 395 print traceback.format_exc()
390 if attempt + 1 >= step.attempts: 396 if attempt + 1 >= step.attempts:
391 raise 397 raise
392 # pylint: disable=W0212 398 # pylint: disable=W0212
393 step._WaitFunc(attempt) 399 step._WaitFunc(attempt)
394 attempt += 1 400 attempt += 1
395 print '**** %s, attempt %d ****' % (StepType.__name__, attempt + 1) 401 print '**** %s, attempt %d ****' % (StepType.__name__, attempt + 1)
OLDNEW
« no previous file with comments | « slave/skia_slave_scripts/apply_patch.py ('k') | slave/skia_slave_scripts/check_buildslave_host_disk_usage.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698