Skip to content
Snippets Groups Projects
Commit 4a42fe06 authored by Scott Jackson's avatar Scott Jackson Committed by Albert Gil
Browse files

Testsuite - Eliminate direct printing of SUCCESS messages

Bug 6597
parent 90990060
No related branches found
No related tags found
No related merge requests found
Showing
with 21 additions and 64 deletions
...@@ -198,7 +198,7 @@ proc inc3_11_7 {} { ...@@ -198,7 +198,7 @@ proc inc3_11_7 {} {
exp_continue exp_continue
} }
-re "JobState=PENDING" { -re "JobState=PENDING" {
send_user "\n\033\[32mSUCCESS: Job $job_id is PENDING as expected (Within: inc3.11.7)\033\[m\n" log_info "Job $job_id is PENDING as expected (Within: inc3.11.7)"
exp_continue exp_continue
} }
-re "JobState=RUNNING" { -re "JobState=RUNNING" {
...@@ -250,7 +250,7 @@ proc inc3_11_7 {} { ...@@ -250,7 +250,7 @@ proc inc3_11_7 {} {
exp_continue exp_continue
} }
-re "JobState=PENDING" { -re "JobState=PENDING" {
send_user "\n\033\[32mSUCCESS: Job $job_id is PENDING as expected (Within: inc3.11.7)\033\[m\n" log_info "ob $job_id is PENDING as expected (Within: inc3.11.7)"
exp_continue exp_continue
} }
-re "JobState=RUNNING" { -re "JobState=RUNNING" {
...@@ -291,7 +291,7 @@ proc inc3_11_7 {} { ...@@ -291,7 +291,7 @@ proc inc3_11_7 {} {
exp_continue exp_continue
} }
-re "JobState=RUNNING" { -re "JobState=RUNNING" {
send_user "\n\033\[32mSUCCESS: Job $job_id is RUNNING as expected (Within: inc3.11.7)\033\[m\n" log_info "Job $job_id is RUNNING as expected (Within: inc3.11.7)"
exp_continue exp_continue
} }
timeout { timeout {
......
...@@ -141,7 +141,7 @@ proc inc3_11_8 {} { ...@@ -141,7 +141,7 @@ proc inc3_11_8 {} {
cancel_job $job_id cancel_job $job_id
exit $ret_code exit $ret_code
} }
send_user "\n\033\[32mSUCCESS: reservation was created as expected (Within: inc3.11.8)\033\[m\n" log_info "Reservation was created as expected (Within: inc3.11.8)"
# Delete the reservation # Delete the reservation
set ret_code [delete_res $res_name] set ret_code [delete_res $res_name]
...@@ -154,7 +154,7 @@ proc inc3_11_8 {} { ...@@ -154,7 +154,7 @@ proc inc3_11_8 {} {
# Make the reservation using more cores then free in a node # Make the reservation using more cores then free in a node
set ret_code [create_res "StartTime=now Duration=60 Nodes=$host_name CoreCnt=$core_res_num User=$user_name" 1] set ret_code [create_res "StartTime=now Duration=60 Nodes=$host_name CoreCnt=$core_res_num User=$user_name" 1]
if {$ret_code != 0} { if {$ret_code != 0} {
send_user "\n\033\[32mSUCCESS: Reservation can not be created as expected (Within: inc3.11.8)\033\[m\n" log_info "Reservation can not be created as expected (Within: inc3.11.8)"
} else { } else {
send_user "\n\033\[31mFAILURE: reservation was created when it should have not (Within: inc3.11.8)\033\[m\n" send_user "\n\033\[31mFAILURE: reservation was created when it should have not (Within: inc3.11.8)\033\[m\n"
set exit_code 1 set exit_code 1
...@@ -170,7 +170,7 @@ proc inc3_11_8 {} { ...@@ -170,7 +170,7 @@ proc inc3_11_8 {} {
send_user "\n\033\[31mFAILURE: Reservation can not be created when it should (Within: inc3.11.8)\033\[m\n" send_user "\n\033\[31mFAILURE: Reservation can not be created when it should (Within: inc3.11.8)\033\[m\n"
set exit_code 1 set exit_code 1
} else { } else {
send_user "\n\033\[32mSUCCESS: Reservation can be created as expected (Within: inc3.11.8)\033\[m\n" log_info "Reservation can be created as expected (Within: inc3.11.8)"
# Delete the reservation # Delete the reservation
set ret_code [delete_res $res_name] set ret_code [delete_res $res_name]
} }
...@@ -178,7 +178,7 @@ proc inc3_11_8 {} { ...@@ -178,7 +178,7 @@ proc inc3_11_8 {} {
# Make the reservation using more cores than free at reservation start time # Make the reservation using more cores than free at reservation start time
set ret_code [create_res "StartTime=now+300 Duration=60 Nodes=$host_name CoreCnt=$core_res_num User=$user_name" 1] set ret_code [create_res "StartTime=now+300 Duration=60 Nodes=$host_name CoreCnt=$core_res_num User=$user_name" 1]
if {$ret_code != 0} { if {$ret_code != 0} {
send_user "\n\033\[32mSUCCESS: Reservation can not be created as expected (Within 3.11.8)\033\[m\n" log_info "Reservation can not be created as expected (Within 3.11.8)"
} else { } else {
send_user "\n\033\[31mFAILURE: Reservation can be created when it should not (Within: inc3.11.8)\033\[m\n" send_user "\n\033\[31mFAILURE: Reservation can be created when it should not (Within: inc3.11.8)\033\[m\n"
set exit_code 1 set exit_code 1
......
...@@ -138,7 +138,7 @@ proc inc3_11_9 {} { ...@@ -138,7 +138,7 @@ proc inc3_11_9 {} {
exit 1 exit 1
} }
send_user "\n\033\[32mSUCCESS: reservation was created as expected (Within: inc3.11.9)\033\[m\n" log_info "Reservation was created as expected (Within: inc3.11.9)"
# Delete the reservation # Delete the reservation
set ret_code [delete_res $res_name] set ret_code [delete_res $res_name]
...@@ -151,7 +151,7 @@ proc inc3_11_9 {} { ...@@ -151,7 +151,7 @@ proc inc3_11_9 {} {
# Make the reservation using more cores then free in a node # Make the reservation using more cores then free in a node
set ret_code [create_res "StartTime=now Duration=60 Nodes=$def_node_name\[$min_node_inx\-$max_node_inx\] CoreCnt=1,1,1,1,$core_res_num User=$user_name" 1] set ret_code [create_res "StartTime=now Duration=60 Nodes=$def_node_name\[$min_node_inx\-$max_node_inx\] CoreCnt=1,1,1,1,$core_res_num User=$user_name" 1]
if {$ret_code != 0} { if {$ret_code != 0} {
send_user "\n\033\[32mSUCCESS: Reservation can not be created as expected (Within: inc3.11.9)\033\[m\n" log_info "Reservation can not be created as expected (Within: inc3.11.9)"
} else { } else {
send_user "\n\033\[31mFAILURE: reservation was created when it should have not (Within: inc3.11.9)\033\[m\n" send_user "\n\033\[31mFAILURE: reservation was created when it should have not (Within: inc3.11.9)\033\[m\n"
set exit_code 1 set exit_code 1
...@@ -171,7 +171,7 @@ proc inc3_11_9 {} { ...@@ -171,7 +171,7 @@ proc inc3_11_9 {} {
send_user "\n\033\[31mFAILURE: Reservation can not be created when it should (Within: inc3.11.9)\033\[m\n" send_user "\n\033\[31mFAILURE: Reservation can not be created when it should (Within: inc3.11.9)\033\[m\n"
set exit_code 1 set exit_code 1
} else { } else {
send_user "\n\033\[32mSUCCESS: Reservation can be created as expected (Within: inc3.11.9)\033\[m\n" log_info "Reservation can be created as expected (Within: inc3.11.9)"
# Delete the reservation # Delete the reservation
set ret_code [delete_res $res_name] set ret_code [delete_res $res_name]
if {$ret_code != 0} { if {$ret_code != 0} {
...@@ -183,7 +183,7 @@ proc inc3_11_9 {} { ...@@ -183,7 +183,7 @@ proc inc3_11_9 {} {
# Make the reservation using more cores than free at reservation start time # Make the reservation using more cores than free at reservation start time
set ret_code [create_res "StartTime=now+300 Duration=60 Nodes=$def_node_name\[$min_node_inx\-$max_node_inx\] CoreCnt=1,1,1,1,$core_res_num User=$user_name" 1] set ret_code [create_res "StartTime=now+300 Duration=60 Nodes=$def_node_name\[$min_node_inx\-$max_node_inx\] CoreCnt=1,1,1,1,$core_res_num User=$user_name" 1]
if {$ret_code != 0} { if {$ret_code != 0} {
send_user "\n\033\[32mSUCCESS: Reservation can not be created as expected (Within: inc3.11.9)\033\[m\n" log_info "Reservation can not be created as expected (Within: inc3.11.9)"
} else { } else {
send_user "\n\033\[31mFAILURE: Reservation can be created when it should not (Within: inc3.11.9)\033\[m\n" send_user "\n\033\[31mFAILURE: Reservation can be created when it should not (Within: inc3.11.9)\033\[m\n"
set exit_code 1 set exit_code 1
...@@ -204,7 +204,7 @@ proc inc3_11_9 {} { ...@@ -204,7 +204,7 @@ proc inc3_11_9 {} {
exit $ret_code exit $ret_code
} }
send_user "\n\033\[32mSUCCESS: reservation was created as expected (Within: inc3.11.9)\033\[m\n" log_info "Reservation was created as expected (Within: inc3.11.9)"
if {$core_res_num < 2} { if {$core_res_num < 2} {
...@@ -225,7 +225,7 @@ proc inc3_11_9 {} { ...@@ -225,7 +225,7 @@ proc inc3_11_9 {} {
exit 1 exit 1
} }
send_user "\n\033\[32mSUCCESS: reservation was not created as expected (Within: inc3.11.9)\033\[m\n" log_info "Reservation was not created as expected (Within: inc3.11.9)"
# Now creating a reservation using first 5 nodes and just 1 core per node # Now creating a reservation using first 5 nodes and just 1 core per node
set ret_code [create_res "StartTime=now Duration=60 Nodes=$def_node_name\[$min_node_inx\-$max_node_inx\] CoreCnt=1,1,1,1,1 User=$user_name" 1] set ret_code [create_res "StartTime=now Duration=60 Nodes=$def_node_name\[$min_node_inx\-$max_node_inx\] CoreCnt=1,1,1,1,1 User=$user_name" 1]
...@@ -235,7 +235,7 @@ proc inc3_11_9 {} { ...@@ -235,7 +235,7 @@ proc inc3_11_9 {} {
exit 1 exit 1
} }
send_user "\n\033\[32mSUCCESS: reservation was created as expected (Within: inc3.11.9)\033\[m\n" log_info "Reservation was created as expected (Within: inc3.11.9)"
# Submit a batch job: a job using cores available in first 5 nodes # Submit a batch job: a job using cores available in first 5 nodes
set core_res_num [ expr $cores_per_node / 2 ] set core_res_num [ expr $cores_per_node / 2 ]
...@@ -669,7 +669,7 @@ proc inc3_11_9 {} { ...@@ -669,7 +669,7 @@ proc inc3_11_9 {} {
cancel_job $job_id cancel_job $job_id
exit $ret_code exit $ret_code
} }
send_user "\nSUCCESS: Reservation can be created as expected (Within 3.11.9)\n" log_info "Reservation can be created as expected (Within 3.11.9)"
set exp_node_cnt [expr {$max_node_inx-$min_node_inx+1}] set exp_node_cnt [expr {$max_node_inx-$min_node_inx+1}]
set exp_core_cnt [expr {8+$cores_per_node}] set exp_core_cnt [expr {8+$cores_per_node}]
...@@ -739,7 +739,7 @@ proc inc3_11_9 {} { ...@@ -739,7 +739,7 @@ proc inc3_11_9 {} {
set exit_code 1 set exit_code 1
} }
if {$exit_code == 0} { if {$exit_code == 0} {
send_user "\nSUCCESS: Reservation has correct nodes, CoreCnt, and CoreIDs.\n" log_info "Reservation has correct nodes, CoreCnt, and CoreIDs."
} }
cancel_job $job_id cancel_job $job_id
...@@ -812,5 +812,5 @@ proc inc3_11_9 {} { ...@@ -812,5 +812,5 @@ proc inc3_11_9 {} {
delete_res $res_name delete_res $res_name
exit 1 exit 1
} }
send_user "\nSUCCESS: Reservation can not be created as expected (Within 3.11.9)\n" log_info "Reservation can not be created as expected (Within 3.11.9)"
} }
...@@ -87,7 +87,4 @@ if {[string compare $login_grp_info $job_grp_info] != 0} { ...@@ -87,7 +87,4 @@ if {[string compare $login_grp_info $job_grp_info] != 0} {
send_user "\nFAILURE: Login and slurm user info mismatch\n" send_user "\nFAILURE: Login and slurm user info mismatch\n"
set exit_code 1 set exit_code 1
} }
if {$exit_code == 0} {
send_user "\nSUCCESS\n"
}
exit $exit_code exit $exit_code
...@@ -67,7 +67,4 @@ if {$debug_get != $debug_set} { ...@@ -67,7 +67,4 @@ if {$debug_get != $debug_set} {
send_user "\nFAILURE: Did not log at proper level ($debug_get != $debug_set)\n" send_user "\nFAILURE: Did not log at proper level ($debug_get != $debug_set)\n"
set exit_code 1 set exit_code 1
} }
if {$exit_code == 0} {
send_user "\nSUCCESS\n"
}
exit $exit_code exit $exit_code
...@@ -186,7 +186,4 @@ if {[string compare $tested_layout $expected_layout]} { ...@@ -186,7 +186,4 @@ if {[string compare $tested_layout $expected_layout]} {
set exit_code 1 set exit_code 1
} }
if {$exit_code == 0} {
send_user "\nSUCCESS\n"
}
exit $exit_code exit $exit_code
...@@ -143,6 +143,5 @@ if {$exec_cnt != $node_cnt} { ...@@ -143,6 +143,5 @@ if {$exec_cnt != $node_cnt} {
if {$exit_code == 0} { if {$exit_code == 0} {
exec rm -f $file_in exec rm -f $file_in
send_user "\nSUCCESS\n"
} }
exit $exit_code exit $exit_code
...@@ -65,7 +65,4 @@ expect { ...@@ -65,7 +65,4 @@ expect {
} }
} }
if {$exit_code == 0} {
send_user "\nSUCCESS\n"
}
exit $exit_code exit $exit_code
...@@ -43,9 +43,7 @@ print_header $test_id ...@@ -43,9 +43,7 @@ print_header $test_id
proc endit { } { proc endit { } {
global exit_code global exit_code
reconfigure reconfigure
if {$exit_code == 0} { if {$exit_code != 0} {
send_user "\nSUCCESS\n"
} else {
send_user "\nFAILURE: exiting with exit code $exit_code\n" send_user "\nFAILURE: exiting with exit code $exit_code\n"
} }
exit $exit_code exit $exit_code
......
...@@ -279,6 +279,5 @@ if {$found != 0} { ...@@ -279,6 +279,5 @@ if {$found != 0} {
if {$exit_code == 0} { if {$exit_code == 0} {
exec $bin_rm $test_srun $file_in exec $bin_rm $test_srun $file_in
send_user "\nSUCCESS\n"
} }
exit $exit_code exit $exit_code
...@@ -92,7 +92,4 @@ if {$job_id == 0} { ...@@ -92,7 +92,4 @@ if {$job_id == 0} {
} }
} }
if {$exit_code == 0} {
send_user "\nSUCCESS\n"
}
exit $exit_code exit $exit_code
...@@ -72,7 +72,4 @@ if {$time_error == 0} { ...@@ -72,7 +72,4 @@ if {$time_error == 0} {
send_user "\nTime limit error expected, no worries\n" send_user "\nTime limit error expected, no worries\n"
} }
if {$exit_code == 0} {
send_user "\nSUCCESS\n"
}
exit $exit_code exit $exit_code
...@@ -44,9 +44,7 @@ print_header $test_id ...@@ -44,9 +44,7 @@ print_header $test_id
proc endit { } { proc endit { } {
global exit_code global exit_code
reconfigure reconfigure
if {$exit_code == 0} { if {$exit_code != 0} {
send_user "\nSUCCESS\n"
} else {
send_user "\nFAILURE: exiting with exit code $exit_code\n" send_user "\nFAILURE: exiting with exit code $exit_code\n"
} }
exit $exit_code exit $exit_code
......
...@@ -70,7 +70,4 @@ if {$job_id != 0} { ...@@ -70,7 +70,4 @@ if {$job_id != 0} {
exit 1 exit 1
} }
if {$exit_code == 0} {
send_user "\nSUCCESS\n"
}
exit $exit_code exit $exit_code
...@@ -72,9 +72,7 @@ if {$invalid_tl == 0} { ...@@ -72,9 +72,7 @@ if {$invalid_tl == 0} {
exit 1 exit 1
} }
if {$exit_code == 0} { if {$exit_code != 0} {
send_user "\nSUCCESS\n"
} else {
send_user "\nFAILURE: job not with DEADLINE status.\n" send_user "\nFAILURE: job not with DEADLINE status.\n"
} }
exit $exit_code exit $exit_code
...@@ -119,7 +119,4 @@ if {[ string compare $short1 $short2 ] != 0} { ...@@ -119,7 +119,4 @@ if {[ string compare $short1 $short2 ] != 0} {
set exit_code 1 set exit_code 1
} }
if {$exit_code == 0} {
send_user "\nSUCCESS\n"
}
exit $exit_code exit $exit_code
...@@ -81,7 +81,4 @@ if {[wait_for_job $job_id DONE] != 0} { ...@@ -81,7 +81,4 @@ if {[wait_for_job $job_id DONE] != 0} {
exit 1 exit 1
} }
if {$exit_code == 0} {
send_user "\nSUCCESS\n"
}
exit $exit_code exit $exit_code
...@@ -43,9 +43,7 @@ print_header $test_id ...@@ -43,9 +43,7 @@ print_header $test_id
proc endit { } { proc endit { } {
global exit_code global exit_code
reconfigure reconfigure
if {$exit_code == 0} { if {$exit_code != 0} {
send_user "\nSUCCESS\n"
} else {
send_user "\nFAILURE: exiting with exit code $exit_code\n" send_user "\nFAILURE: exiting with exit code $exit_code\n"
} }
exit $exit_code exit $exit_code
......
...@@ -94,7 +94,4 @@ expect { ...@@ -94,7 +94,4 @@ expect {
} }
} }
if {$exit_code == 0} {
send_user "\nSUCCESS\n"
}
exit $exit_code exit $exit_code
...@@ -99,7 +99,4 @@ expect { ...@@ -99,7 +99,4 @@ expect {
} }
} }
if {$exit_code == 0} {
send_user "\nSUCCESS\n"
}
exit $exit_code exit $exit_code
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