Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve starting ipmi_sim program #9378

Merged
merged 4 commits into from
Nov 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions testsuite/features/step_definitions/command_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -578,12 +578,17 @@
raise ScriptError, 'File injection failed' unless success
end
server.run('chmod +x /etc/ipmi/fake_ipmi_host.sh', verbose: true, check_errors: true)
server.run('ipmi_sim -n < /dev/null > /dev/null &', verbose: true, check_errors: true)
# Check if ipmi_sim is already running
if server.run('pgrep -f ipmi_sim', verbose: false, check_errors: false)[1].zero?
log 'ipmi_sim is already running; skipping startup.'
else
server.run('ipmi_sim -n < /dev/null > /dev/null &', verbose: true, check_errors: true)
end
end

When(/^the server stops mocking an IPMI host$/) do
get_target('server').run('pkill ipmi_sim')
get_target('server').run('pkill 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
Expand Down
Loading