Skip to content
Snippets Groups Projects
Commit cf742af3 authored by Morris Jette's avatar Morris Jette
Browse files

Disable a test based upon configuration

Disable a partition test if JobSubmitPlugins=all_partitions
parent 3e2cb7c6
No related branches found
No related tags found
No related merge requests found
......@@ -2995,6 +2995,43 @@ proc slurmctld_plug_stack_nonstop { } {
return $nonstop_enforce
}
################################################################
#
# Proc: job_submit_all_partitions
#
# Purpose: Use scontrol to determine if the JobSubmitPlugins
# includes "all_partitions".
#
# Returns: 1 if the value is set to nonstop.
#
################################################################
proc job_submit_all_partitions { } {
global scontrol alpha_numeric_comma
log_user 0
set all_partitions 0
set scon_pid [spawn -noecho $scontrol show config]
expect {
-re "JobSubmitPlugins *= ($alpha_numeric_comma)" {
if {[string first $expect_out(1,string) "all_partitions"] != -1} {
set all_partitions 1
}
exp_continue
}
timeout {
send_user "\nFAILURE: scontrol not responding\n"
slow_kill $scon_pid
set exit_code 1
}
eof {
wait
}
}
log_user 1
return $all_partitions
}
################################################################
#
# Proc: wait_for_node
......
......@@ -43,6 +43,11 @@ set job_name2 "test$test_id.job2"
print_header $test_id
if {[job_submit_all_partitions] != 0} {
send_user "\nWARNING: This test is incompatable with JobSubmitPlugins=all_partitions\n"
exit 0
}
if {[test_launch_poe]} {
set step_id 1
} else {
......
......@@ -44,6 +44,11 @@ set job_id 0
print_header $test_id
if {[job_submit_all_partitions] != 0} {
send_user "\nWARNING: This test is incompatable with JobSubmitPlugins=all_partitions\n"
exit 0
}
#
# Execute 'id' to determine my login name
#
......@@ -93,7 +98,6 @@ if {$job_id == 0} {
send_user "\nFAILURE: batch submit failure\n"
exit 1
}
exec $bin_rm -f $file_in
#
# Identify this job's parition
......@@ -186,13 +190,13 @@ expect {
wait
}
}
if {$matches != 0} {
send_user "\nFAILURE: scancel user filter failed\n"
set exit_code 1
}
if {$exit_code == 0} {
exec $bin_rm -f $file_in
send_user "\nSUCCESS\n"
}
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