Skip to content
Snippets Groups Projects
Commit 7b91a031 authored by Danny Auble's avatar Danny Auble
Browse files

simply test

parent 9b167a32
No related branches found
No related tags found
No related merge requests found
......@@ -46,22 +46,18 @@ set mismatches 0
set node_pos 2
array set node_list {}
proc change_state { state } {
proc change_state { state nodes } {
global scontrol exit_code
global scontrol node_list node_pos exit_code
for {set i 0} {$i<2} {incr i 1} {
spawn $scontrol update nodename=$node_list($node_pos) state=$state reason=test
expect {
timeout {
send_user "\nFAILURE: scontrol is not responding\n"
set exit_code 1
}
eof {
wait
}
spawn $scontrol update nodename=$nodes state=$state reason=test
expect {
timeout {
send_user "\nFAILURE: scontrol is not responding\n"
set exit_code 1
}
eof {
wait
}
incr node_pos 1
}
}
......@@ -202,12 +198,16 @@ expect {
cancel_job $tmp_id
# Change nodes to different states and see if they made it to that state.
change_state idle $node_list(2),$node_list(3)
change_state down $node_list(4),$node_list(5)
change_state drain $node_list(6),$node_list(7)
#
# Change node state to idle and use state filter to filter node
#
send_user "\nTesting IDLE state\n"
change_state idle
spawn $sinfo --Node --node=$node_list(2),$node_list(3) --long --exact --state=idle -p$partition
expect {
-re "($end_of_line)($name_string) *($number_with_suffix) *($name_string) *($alpha)" {
......@@ -237,7 +237,6 @@ expect {
# Change node state to down and use state filter to filter node
#
send_user "\nTesting DOWN state\n"
change_state down
spawn $sinfo --Node --node=$node_list(4),$node_list(5) --long --exact --state=down -p$partition
expect {
-re "($end_of_line)($name_string) *($number_with_suffix) *($name_string) *($alpha)" {
......@@ -267,7 +266,6 @@ expect {
# Change node state to drain and use state filter to filter node
#
send_user "\nTesting DRAIN state\n"
change_state drain
spawn $sinfo --Node --node=$node_list(6),$node_list(7) --long --exact --state=drain -p$partition
expect {
-re "($end_of_line)($name_string) *($number_with_suffix) *($name_string) *($alpha)" {
......
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