| """Recipe for running integration tests against locally started cast shell.""" |
| import os |
| |
| from slave import base_recipe |
| from slave.step import cast_shell_step |
| from slave.step import py_env_setup_step |
| from slave.step import x86_integration_test_step |
| |
| # TODO(b/24062312): 'clang' --> 'x86' |
| BUILD_ARCH = 'clang' |
| BUILD_ARGS_PRODUCT = 'video_x64_eng' |
| BUILD_ARGS_OFFICIAL = False |
| BUILD_BRANDING = 'chrome' |
| BUILD_FLAVOR = 'Debug' |
| BUILD_PRODUCT = 'chromecast' |
| ENABLE_CHIRP = False |
| |
| BUILD_CONFIGS = { |
| 'cast_compliance_tests': { |
| 'py3': True, |
| 'py_requirements_path': os.path.join('lab_system', 'requirements3.txt'), |
| }, |
| 'cast_compliance_tests_rbe': {} |
| } |
| |
| |
| def GetValidBuildNames(): |
| return BUILD_CONFIGS.keys() |
| |
| |
| def CreateRecipe(build_name: str, **kwargs): |
| """Builds a recipe object.""" |
| return CastComplianceTestRecipe(build_name, |
| BUILD_CONFIGS[build_name], |
| **kwargs) |
| |
| |
| class CastComplianceTestRecipe(base_recipe.BaseRecipe): |
| """Recipe to run cast compliance tests against x86 cast shell.""" |
| |
| def __init__(self, build_name, build_config, **kwargs): |
| base_recipe.BaseRecipe.__init__( |
| self, enable_build_accelerator=True, **kwargs) |
| self._build_name = build_name |
| self._py3 = build_config.get('py3', False) |
| self._requirements_path = build_config.get( |
| 'py_requirements_path', os.path.join('lab_system', 'requirements.txt')) |
| |
| def get_steps(self): |
| steps = [ |
| cast_shell_step.CastShellStep(BUILD_BRANDING, BUILD_ARCH, |
| BUILD_PRODUCT, BUILD_FLAVOR, ENABLE_CHIRP, |
| build_args_product=BUILD_ARGS_PRODUCT, |
| build_args_official=BUILD_ARGS_OFFICIAL, |
| halt_on_failure=True, |
| **self._step_kwargs), |
| py_env_setup_step.PyEnvSetupStep( |
| local_packages_dir='team-catatester/python_packages', |
| py3=self._py3, |
| requirements_path=self._requirements_path, |
| requirements_project='test', |
| **self._step_kwargs), |
| x86_integration_test_step.RunIntegrationTestStep( |
| test_case_class=['CastReceiverComplianceTestCase'], |
| # TODO(kiranthampi): re-enable when b/34853664 is resolved. |
| # 'CastReceiverCapabilityTestCase', |
| # 'CastReceiverMirroringProtocolTestCase', |
| # 'CastReceiverMultipleSendersTestCase', |
| # 'CastReceiverQueueTestCase', |
| # 'CastReceiverStressTestCase', |
| # TODO(mbjorge|kiranthampi): re-enable when b/27219805 is resolved. |
| # 'CastReceiverVolumeControlTestCase' |
| test_case_module='eurtest.tests.cast.receiver.compliance_test_case', |
| test_sequence_class='X86DisabledLoggingTestSequence', |
| test_sequence_module=('eurtest.framework.disabled_logging_' |
| 'test_sequence'), |
| test_config_file_path='tests.cast.receiver_x86', |
| headless=True, |
| **self._step_kwargs), |
| ] |
| return steps |