Skip to content

Commit

Permalink
Add REBOOT_SCRIPT in TF agent environment (#381)
Browse files Browse the repository at this point in the history
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').
  • Loading branch information
rmartin013 authored Oct 16, 2024
1 parent a38a81d commit f3c0e16
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f3c0e16

Please sign in to comment.