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

Side by Side Diff: slave/skia_slave_scripts/flavor_utils/chromeos_build_step_utils.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 """ Utilities for ChromeOS build steps. """ 5 """ Utilities for ChromeOS build steps. """
6 6
7 from flavor_utils.ssh_build_step_utils import SshBuildStepUtils 7 from flavor_utils.ssh_build_step_utils import SshBuildStepUtils
8 from slave import slave_utils 8 from slave import slave_utils
9 from utils import shell_utils 9 from py.utils import shell_utils
10 import os 10 import os
11 11
12 12
13 class ChromeosBuildStepUtils(SshBuildStepUtils): 13 class ChromeosBuildStepUtils(SshBuildStepUtils):
14 def __init__(self, build_step_instance): 14 def __init__(self, build_step_instance):
15 SshBuildStepUtils.__init__(self, build_step_instance) 15 SshBuildStepUtils.__init__(self, build_step_instance)
16 self._remote_dir = '/usr/local/skiabot' 16 self._remote_dir = '/usr/local/skiabot'
17 systemtype = 'chromeos-' + self._step.args['board'] 17 systemtype = 'chromeos-' + self._step.args['board']
18 self._build_dir = os.path.join('out', 'config', systemtype) 18 self._build_dir = os.path.join('out', 'config', systemtype)
19 19
20 def Compile(self, target): 20 def Compile(self, target):
21 """ Compile the Skia executables. """ 21 """ Compile the Skia executables. """
22 # Add gsutil to PATH 22 # Add gsutil to PATH
23 gsutil = slave_utils.GSUtilSetup() 23 gsutil = slave_utils.GSUtilSetup()
24 os.environ['PATH'] += os.pathsep + os.path.dirname(gsutil) 24 os.environ['PATH'] += os.pathsep + os.path.dirname(gsutil)
25 25
26 # Run the chromeos_make script. 26 # Run the chromeos_make script.
27 make_cmd = os.path.join('platform_tools', 'chromeos', 'bin', 27 make_cmd = os.path.join('platform_tools', 'chromeos', 'bin',
28 'chromeos_make') 28 'chromeos_make')
29 cmd = [make_cmd, 29 cmd = [make_cmd,
30 '-d', self._step.args['board'], 30 '-d', self._step.args['board'],
31 target, 31 target,
32 'BUILDTYPE=%s' % self._step.configuration, 32 'BUILDTYPE=%s' % self._step.configuration,
33 ] 33 ]
34 34
35 cmd.extend(self._step.default_make_flags) 35 cmd.extend(self._step.default_make_flags)
36 cmd.extend(self._step.make_flags) 36 cmd.extend(self._step.make_flags)
37 shell_utils.run(cmd) 37 shell_utils.run(cmd)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698