diff --git a/device-connectors/src/testflinger_device_connectors/devices/muxpi/muxpi.py b/device-connectors/src/testflinger_device_connectors/devices/muxpi/muxpi.py index 13cc551d..412203a5 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/muxpi/muxpi.py +++ b/device-connectors/src/testflinger_device_connectors/devices/muxpi/muxpi.py @@ -126,13 +126,10 @@ def _copy_to_control(self, local_file, remote_file): raise ProvisioningError(e.output) return output - def reboot_control_host(self): + def reboot_sdwire(self): """ - Reboot the control host - Sometimes the control host can end up in an unstable condition which - isn't easy to detect until it's too late. Since nothing else should - be using the control host, check and power cycle it if needed before - provisioning to ensure it's in a known good state. + Reboot both control host and DUT to ensure SDwire be in a good state + before provisioning. """ if not self.config.get("control_host_reboot_script"): logger.warning( @@ -148,6 +145,9 @@ def reboot_control_host(self): except Exception: raise ProvisioningError("fail to reboot control host") + logger.info("Rebooting DUT") + self.hardreset() + reboot_timeout = self.config.get("control_host_reboot_timeout", 120) time.sleep(reboot_timeout) # It should be up after 120s, but wait for another cycle if necessary @@ -214,7 +214,7 @@ def provision(self): # If this is not a zapper, reboot before provisioning if "zapper" not in self.config.get("control_switch_local_cmd", ""): - self.reboot_control_host() + self.reboot_sdwire() time.sleep(5) self.flash_test_image(source)