Skip to content
Snippets Groups Projects
Commit 1b72bf4f authored by Marshall Garey's avatar Marshall Garey Committed by Tim Wickberg
Browse files

testsuite - add global 'reconfigure' function

Bug 4926.
parent b882c2c8
No related branches found
No related tags found
No related merge requests found
...@@ -4237,6 +4237,51 @@ proc test_pack_step { } { ...@@ -4237,6 +4237,51 @@ proc test_pack_step { } {
return $pack_step return $pack_step
} }
################################################################
#
# Proc: reconfigure
#
# Purpose: Calls scontrol reconfigure.
#
# Input (optional) cluster - The cluster to reconfigure.
# Output global exit_code - Sets exit_code to 1 on failure.
#
# Returns void
#
################################################################
proc reconfigure { {cluster ""} } {
global exit_code scontrol
if { $cluster == "" } {
spawn $scontrol reconfigure
} else {
spawn $scontrol -M$cluster reconfigure
}
expect {
-re "slurm_reconfigure error: Invalid user id" {
log_error "Invalid user id"
set exit_code 1
exp_continue
}
-re "Error|error" {
log_error "scontrol reconfigure error"
set exit_code 1
exp_continue
}
timeout {
log_error "scontrol not responding\n"
set exit_code 1
}
eof {
wait
}
}
#
# Wait for reconfigure to complete, then return.
#
sleep 5
}
proc log_error {msg} { proc log_error {msg} {
send_user "\nFAILURE: $msg\n" send_user "\nFAILURE: $msg\n"
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment