Skip to content
Snippets Groups Projects
Commit e2cc98a3 authored by Moe Jette's avatar Moe Jette
Browse files

improve the error handling in a few tests.

parent c383daa7
No related branches found
No related tags found
No related merge requests found
...@@ -80,7 +80,8 @@ expect { ...@@ -80,7 +80,8 @@ expect {
set job_id2 $expect_out(1,string) set job_id2 $expect_out(1,string)
exp_continue exp_continue
} }
-re "JobState=COMPLETED" { # COMPLETED or COMPLETING
-re "JobState=COMPLET" {
set match_state 1 set match_state 1
exp_continue exp_continue
} }
......
...@@ -129,7 +129,9 @@ if {$new_prio != $read_priority} { ...@@ -129,7 +129,9 @@ if {$new_prio != $read_priority} {
set exit_code 1 set exit_code 1
} }
cancel_job $job_id if {[cancel_job $job_id] != 0} {
set exit_code 1
}
if {$exit_code == 0} { if {$exit_code == 0} {
send_user "\nSUCCESS\n" send_user "\nSUCCESS\n"
} }
......
...@@ -226,7 +226,7 @@ if {$completing_jobs != 0} { ...@@ -226,7 +226,7 @@ if {$completing_jobs != 0} {
set completing_jobs 0 set completing_jobs 0
spawn $squeue --noheader --user $user_name spawn $squeue --noheader --user $user_name
expect { expect {
-re "$user_name *CG" { -re "$job_name *$user_name *CG" {
incr completing_jobs incr completing_jobs
exp_continue exp_continue
} }
...@@ -246,7 +246,7 @@ if {$completing_jobs != 0} { ...@@ -246,7 +246,7 @@ if {$completing_jobs != 0} {
exec $bin_sleep $max_wait exec $bin_sleep $max_wait
spawn $squeue --noheader --user $user_name spawn $squeue --noheader --user $user_name
expect { expect {
-re "$user_name *CG" { -re "$job_name *$user_name *CG" {
incr completing_jobs incr completing_jobs
exp_continue exp_continue
} }
......
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