| """Build step class for executing Fuchsia hermetic tests.""" |
| |
| from __future__ import absolute_import |
| import os |
| |
| from slave import base_step |
| from slave.step import shell_step |
| |
| class FuchsiaHermeticTestStep(base_step.BaseStep): |
| """Build step class to run runner scripts as unit tests.""" |
| |
| def __init__(self, name='fuchsia_hermetic_tests', arch='x64', **kwargs): |
| base_step.BaseStep.__init__(self, name=name, **kwargs) |
| self._arch = arch |
| |
| def run(self): |
| command = ['python3', os.path.join(self.get_project_path('standalone/src'), |
| 'build/fuchsia/catabuilder_test_hook.py')] |
| |
| command += ['--test_group_name', self.name] |
| command += ['--arch', self._arch] |
| |
| returncode, _, _ = self.exec_subprocess(command) |
| |
| return returncode == 0 |