Skip to content

uuu: skip uuu if device ok once user specify skip explicitly

Larry Shen requested to merge atline/lava:skip_uuu_if_device_ok into master

This MR close https://lists.lavasoftware.org/archives/list/lava-users@lists.lavasoftware.org/thread/AHWWDQWS2ZEAL35UROVAO6K57CQIEGOA/

User can define skip_uuu_if_bootloader_valid: true in job to explicitly enable this feature, otherwise it works as usual.

class UUUBootRetryAction(RetryAction):
    def populate(self, parameters):
        self.pipeline = Pipeline(parent=self, job=self.job, parameters=parameters)
        if parameters.get("skip_uuu_if_bootloader_valid"):
            self.pipeline.add_action(CheckBootloaderValidAction())
        self.pipeline.add_action(UUUAction())

For above code, if user not specify skip_uuu_if_bootloader_valid, then it just goes to old code UUUAction, no logic changed. If user specify skip_uuu_if_bootloader_valid, then go to uboot to see if the bootloader really ok, if ok, skip the usual UUU flash and finish the job, if not ok, go to the usual UUU flash. We mainly use it for our health-check job.

Edited by Larry Shen

Merge request reports