def populate(self, parameters): self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters) # Check if the device has a power command such as HiKey, Dragonboard, # etc. against device that doesn't like Nexus, etc. # This is required in order to power on the device so that when the # test job writer wants to perform some operation using a # lava-test-shell action that follows, this becomes mandatory. Think of # issuing any fastboot commands on the powered on device. # # NOTE: Add more power on strategies, if required for specific devices. if self.job.device.get('fastboot_via_uboot', False): self.internal_pipeline.add_action(ConnectDevice()) self.internal_pipeline.add_action(UBootEnterFastbootAction()) elif self.job.device.hard_reset_command: self.force_prompt = True self.internal_pipeline.add_action(ConnectDevice()) self.internal_pipeline.add_action(ResetDevice()) else: self.internal_pipeline.add_action(EnterFastbootAction()) self.download_dir = self.mkdtemp() image_keys = sorted(parameters['images'].keys()) for image in image_keys: if image != 'yaml_line': self.internal_pipeline.add_action( DownloaderAction(image, self.download_dir)) if self.test_needs_overlay(parameters): self.internal_pipeline.add_action(OverlayAction()) self.internal_pipeline.add_action(CopyToLxcAction())
def populate(self, parameters): self.pipeline = Pipeline(parent=self, job=self.job, parameters=parameters) if self.test_needs_overlay(parameters): self.pipeline.add_action(OverlayAction()) # Check if the device has a power command such as HiKey, Dragonboard, # etc. against device that doesn't like Nexus, etc. if self.job.device.get("fastboot_via_uboot", False): self.pipeline.add_action(ConnectDevice()) self.pipeline.add_action(UBootEnterFastbootAction()) elif self.job.device.hard_reset_command: self.force_prompt = True self.pipeline.add_action(ConnectDevice()) if not is_lxc_requested(self.job): self.pipeline.add_action(PrePower()) self.pipeline.add_action(ResetDevice()) else: self.pipeline.add_action(EnterFastbootAction()) fastboot_dir = self.mkdtemp() for image in sorted(parameters["images"].keys()): self.pipeline.add_action( DownloaderAction( image, fastboot_dir, params=parameters["images"][image] ) ) if parameters["images"][image].get("apply-overlay", False): if self.test_needs_overlay(parameters): if parameters["images"][image].get("sparse", True): self.pipeline.add_action(ApplyOverlaySparseImage(image)) else: use_root_part = parameters["images"][image].get( "root_partition", False ) self.pipeline.add_action( ApplyOverlayImage(image, use_root_partition=use_root_part) ) if self.test_needs_overlay(parameters) and self.test_needs_deployment( parameters ): self.pipeline.add_action(DeployDeviceEnvironment()) self.pipeline.add_action(FastbootFlashOrderAction())
def populate(self, parameters): self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters) if self.test_needs_overlay(parameters): self.internal_pipeline.add_action(OverlayAction()) # Check if the device has a power command such as HiKey, Dragonboard, # etc. against device that doesn't like Nexus, etc. if self.job.device.get('fastboot_via_uboot', False): self.internal_pipeline.add_action(ConnectDevice()) self.internal_pipeline.add_action(UBootEnterFastbootAction()) elif self.job.device.hard_reset_command: self.force_prompt = True self.internal_pipeline.add_action(ConnectDevice()) self.internal_pipeline.add_action(ResetDevice()) else: self.internal_pipeline.add_action(EnterFastbootAction()) fastboot_dir = self.mkdtemp() image_keys = sorted(parameters['images'].keys()) for image in image_keys: if image != 'yaml_line': self.internal_pipeline.add_action( DownloaderAction(image, fastboot_dir)) if parameters['images'][image].get('apply-overlay', False): if self.test_needs_overlay(parameters): if parameters['images'][image].get('sparse', True): self.internal_pipeline.add_action( ApplyOverlaySparseImage(image)) else: self.internal_pipeline.add_action( ApplyOverlayImage(image, use_root_partition=False)) if self.test_needs_overlay(parameters) and \ self.test_needs_deployment(parameters): self.internal_pipeline.add_action( DeployDeviceEnvironment()) self.internal_pipeline.add_action(FastbootFlashOrderAction())
def populate(self, parameters): self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters) image_keys = list(parameters['images'].keys()) if self.test_needs_overlay(parameters): self.logger.debug("[SEOJI] add OverlayAction") self.internal_pipeline.add_action(OverlayAction()) # Check if the device has a power command such as HiKey, Dragonboard, # etc. against device that doesn't like Nexus, etc. if self.job.device.get('fastboot_via_uboot', False): self.internal_pipeline.add_action(ConnectDevice()) self.internal_pipeline.add_action(UBootEnterFastbootAction()) elif self.job.device.hard_reset_command: self.force_prompt = True self.internal_pipeline.add_action(ConnectDevice()) if not is_lxc_requested(self.job): self.internal_pipeline.add_action(PrePower()) self.internal_pipeline.add_action(ResetDevice()) elif 'nexell_ext' in image_keys: # Nexell extension #self.internal_pipeline.add_action(OverlayAction()) # download build result if 'url' in parameters['images']['nexell_ext']: self.logger.debug( "[SEOJI] url:" + str(parameters['images']['nexell_ext']['url'])) self.path = '/opt/share' self.internal_pipeline.add_action( DownloaderAction('nexell_ext', self.path)) #if 'compression' in parameters['images']['nexell_ext]: #self.logger.debug("[SEOJI] yes compression param exist") self.logger.debug("SUKER: parameters in deploy/fastboot.py : " + str(parameters)) self.internal_pipeline.add_action( EnterNexellFastbootAction(parameters, 'deploy_script', 'deploy_command1', 'dir_name')) self.internal_pipeline.add_action( ApplyNexellDeployAction(parameters, 'deploy_script', 'deploy_command2', 'dir_name')) else: self.internal_pipeline.add_action(EnterFastbootAction()) fastboot_dir = self.mkdtemp() image_keys = sorted(parameters['images'].keys()) # Nexell extension if 'nexell_ext' in image_keys: self.logger.debug("[SEOJI] pass adding DownloaderAction") #self.internal_pipeline.add_action(DeployDeviceEnvironment()) else: for image in image_keys: if image != 'yaml_line': self.internal_pipeline.add_action( DownloaderAction(image, fastboot_dir)) if parameters['images'][image].get('apply-overlay', False): if self.test_needs_overlay(parameters): if parameters['images'][image].get('sparse', True): self.internal_pipeline.add_action( ApplyOverlaySparseImage(image)) else: self.internal_pipeline.add_action( ApplyOverlayImage( image, use_root_partition=False)) if self.test_needs_overlay(parameters) and \ self.test_needs_deployment(parameters): self.internal_pipeline.add_action( DeployDeviceEnvironment()) self.internal_pipeline.add_action(FastbootFlashOrderAction()) '''