From 8da961156cd19bccc35c72a3456010d90c72b117 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Fri, 15 Nov 2024 12:31:39 +1300 Subject: [PATCH] Improve impi with comments --- testsuite/features/step_definitions/command_steps.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testsuite/features/step_definitions/command_steps.rb b/testsuite/features/step_definitions/command_steps.rb index 9f395dc2cbb..56df3971fe2 100644 --- a/testsuite/features/step_definitions/command_steps.rb +++ b/testsuite/features/step_definitions/command_steps.rb @@ -579,16 +579,16 @@ end server.run('chmod +x /etc/ipmi/fake_ipmi_host.sh', verbose: true, check_errors: true) # Check if ipmi_sim is already running - if server.run('pgrep -f ipmi_sim', verbose: false, check_errors: false).empty? + if server.run('pgrep -f ipmi_sim', verbose: false, check_errors: false)[1] != 0 server.run('ipmi_sim -n < /dev/null > /dev/null &', verbose: true, check_errors: true) else - puts 'ipmi_sim is already running; skipping startup.' + log 'ipmi_sim is already running; skipping startup.' end end When(/^the server stops mocking an IPMI host$/) do get_target('server').run('pkill ipmi_sim') - get_target('server').run('pkill --full fake_ipmi_host.sh || :') + get_target('server').run('pkill --full fake_ipmi_host.sh', verbose: false, check_errors: false) end When(/^the controller starts mocking a Redfish host$/) do