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