blob: dc6fcaec63b62e7c37d11687b24854dbc2faba5e [file]
"""Build step class for building Gotham."""
from __future__ import absolute_import
from slave import base_step
from slave.step import shell_step
class GothamBuildStep(shell_step.ShellStep):
"""Step for building Catatester Binaries."""
def __init__(self, build_name, board, **kwargs):
"""Creates a GothamBuildStep instance.
Args:
build_name: The type of build.
board: Name of the board.
**kwargs: Any additional args to pass to ShellStep.
"""
self._build_name = build_name
self._board = board
shell_step.ShellStep.__init__(self, command=['./build_gotham.sh'], **kwargs)
def run(self):
"""Runs ShellStep to build gotham after appending venv path.
Returns:
result of ShellStep
"""
self._command.append('--skip_setup_venv')
self._command.append('--out_dir={}'.format(self.get_gcs_dir()))
self._command.append(
'--venv_install_dir={}'.format(self.get_step_data('virtual_env_root')))
self._command.append(self.build_number)
self._command.append(self._build_name)
self._command.append(self._board)
return shell_step.ShellStep.run(self)