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

disable sprio test without priority/mulitfactor plugin

parent 11d35b81
No related branches found
No related tags found
No related merge requests found
...@@ -199,6 +199,10 @@ cset super_user_set 0 ...@@ -199,6 +199,10 @@ cset super_user_set 0
proc cancel_job { job_id } { proc cancel_job { job_id } {
global scancel bin_sleep global scancel bin_sleep
if {$job_id == 0} {
return 1
}
send_user "cancelling $job_id\n" send_user "cancelling $job_id\n"
exec $scancel -q $job_id exec $scancel -q $job_id
exec $bin_sleep 1 exec $bin_sleep 1
......
...@@ -35,6 +35,7 @@ source ./globals ...@@ -35,6 +35,7 @@ source ./globals
set test_id "25.1" set test_id "25.1"
set exit_code 0 set exit_code 0
set file_in "test$test_id.input"
set timeout 60 set timeout 60
print_header $test_id print_header $test_id
...@@ -45,6 +46,15 @@ if { [test_account_storage] == 0 } { ...@@ -45,6 +46,15 @@ if { [test_account_storage] == 0 } {
send_user "\nWARNING: This test can't be run without a usable AccountStorageType\n" send_user "\nWARNING: This test can't be run without a usable AccountStorageType\n"
exit 0 exit 0
} }
if { [string compare [priority_type] multifactor] } {
send_user "\nWARNING: This test can't be run without a usable PriorityType\n"
exit 0
}
#
# Build input script file
#
make_bash_script $file_in "$bin_sleep 600"
################################################################ ################################################################
# #
...@@ -58,45 +68,31 @@ if { [test_account_storage] == 0 } { ...@@ -58,45 +68,31 @@ if { [test_account_storage] == 0 } {
proc sub_job {} { proc sub_job {} {
global number sbatch global exit_code file_in number sbatch test_id
set file_in test25.1.input set file_in test${test_id}.input
#
# Build input script file
#
make_bash_script $file_in "
$sbatch sleep 5m
wait
"
#
# Spawn jobs
#
set job_id 0
set job_id 0
spawn $sbatch $file_in spawn $sbatch --output=/dev/null --error=/dev/null $file_in
expect { expect {
-re "Submitted batch job ($number)" { -re "Submitted batch job ($number)" {
set job_id $expect_out(1,string) set job_id $expect_out(1,string)
send_user "\nFOUND JobID to be $job_id\n" send_user "\nFOUND JobID to be $job_id\n"
exp_continue exp_continue
}
timeout {
send_user "\nFAILURE: sbatch not responding\n"
set exit_code 1
}
eof {
wait
}
} }
timeout {
send_user "\nFAILURE: sbatch not responding\n" if {$job_id == 0} {
send_user "\nFAILURE: did not get sbatch job_id\n"
set exit_code 1 set exit_code 1
} }
eof { return $job_id
wait
}
}
if {$job_id == 0} {
send_user "\nFAILURE: did not get sbatch job_id\n"
exit 1
}
return $job_id
} }
################################################################ ################################################################
...@@ -625,11 +621,20 @@ set jobid2 [sub_job] ...@@ -625,11 +621,20 @@ set jobid2 [sub_job]
set jobid3 [sub_job] set jobid3 [sub_job]
set jobid4 [sub_job] set jobid4 [sub_job]
set jobid5 [sub_job] set jobid5 [sub_job]
send_user "\nFirst job ID is $jobid1\n" if {$exit_code != 0} {
send_user "\nSecond job ID is $jobid2\n" [cancel_job $jobid1]
send_user "\nThird job ID is $jobid3\n" [cancel_job $jobid2]
send_user "\nFourth job ID is $jobid4\n" [cancel_job $jobid3]
send_user "\nFifth job ID is $jobid5\n" [cancel_job $jobid4]
[cancel_job $jobid5]
exit $exit_code
}
send_user "\nFirst job ID is $jobid1\n"
send_user "\nSecond job ID is $jobid2\n"
send_user "\nThird job ID is $jobid3\n"
send_user "\nFourth job ID is $jobid4\n"
send_user "\nFifth job ID is $jobid5\n"
# #
# Collect uid # Collect uid
# #
...@@ -771,8 +776,7 @@ cancel_job $jobid5 ...@@ -771,8 +776,7 @@ cancel_job $jobid5
# Exit with code as appropriate # Exit with code as appropriate
# #
if {$exit_code == 0} { if {$exit_code == 0} {
exec $bin_rm -f $file_in
send_user "\nSUCCESS\n" send_user "\nSUCCESS\n"
} else {
send_user "\nFAILURE\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