From f3c0e16d0452ae5be6e2cc4d5b20691f737d75cc Mon Sep 17 00:00:00 2001 From: Remy MARTIN Date: Wed, 16 Oct 2024 18:58:14 +0200 Subject: [PATCH] Add REBOOT_SCRIPT in TF agent environment (#381) This patch allows export the reboot_script commands to a REBOOT_SCRIPT env variable that can later be used within the TF agent script in order to reboot the DUT. That's sometimes necessary when dealing with alternate provisioning methods (calling 'eval $REBOOT_SCRIPT'). --- .../src/testflinger_device_connectors/devices/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/device-connectors/src/testflinger_device_connectors/devices/__init__.py b/device-connectors/src/testflinger_device_connectors/devices/__init__.py index b2ebc3ad..f8d897b6 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/__init__.py +++ b/device-connectors/src/testflinger_device_connectors/devices/__init__.py @@ -198,6 +198,7 @@ def runtest(self, args): extra_env = {} extra_env["AGENT_NAME"] = config.get("agent_name", "") + extra_env["REBOOT_SCRIPT"] = ";".join(config.get("reboot_script", "")) if "env" not in config: config["env"] = {} config["env"].update(extra_env)