From e5273dd449c7cb06848bb1c7fc344d0bae46809b Mon Sep 17 00:00:00 2001 From: Vitalii Chulak Date: Mon, 7 Oct 2024 20:00:14 +0300 Subject: [PATCH] Add host commands support for run_post_start_commands Signed-off-by: Vitalii Chulak --- lib/engines/hcktest/hcktest.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/engines/hcktest/hcktest.rb b/lib/engines/hcktest/hcktest.rb index 4b8c5190..d52cc058 100644 --- a/lib/engines/hcktest/hcktest.rb +++ b/lib/engines/hcktest/hcktest.rb @@ -147,6 +147,17 @@ def run_clients(scope, run_opts = {}) this platform is incorrect' end + def run_clients_post_start_host_commands + @project.engine.drivers&.each do |driver| + driver.post_start_commands&.each do |command| + return unless command.host_run + + @logger.info("Running command (#{command.desc}) on host") + run_cmd(command.host_run) + end + end + end + def configure_and_synchronize_clients run_only = @project.options.test.manual && @project.options.test.driver_path.nil? @@ -154,6 +165,7 @@ def configure_and_synchronize_clients client.configure(run_only:) end + run_clients_post_start_host_commands @clients.each_value(&:synchronize) end