Skip to content
Snippets Groups Projects
Commit 80adaf50 authored by Brian Christiansen's avatar Brian Christiansen
Browse files

Fix fed tests to look at local jobs

The fed tests are checking the state of each sibling on each cluster.
Since squeue/scontrol now combine the jobs from all clusters into one,
the tests need to be update to look at state of the specific cluster.
parent 19b834cf
No related branches found
No related tags found
No related merge requests found
......@@ -492,7 +492,7 @@ proc wait_for_fed_job { job_id desired_state clusters } {
while 1 {
foreach cluster $spec_clusters {
log_info "checking $cluster"
set fd [open "|$scontrol -M$cluster -a -o show job $job_id"]
set fd [open "|$scontrol -M$cluster --local -a -o show job $job_id"]
gets $fd line
catch {close $fd}
if {[regexp {JobState\s*=\s*(\w+)} $line foo state] != 1} {
......
......@@ -268,7 +268,7 @@ proc validate_fed_job { cname job_id expected_origin expected_sib submit_cluster
if {$submit_cluster ne ""} {
set my_squeue "${fed_slurm_base}/$submit_cluster/bin/squeue"
}
spawn $my_squeue --jobs=$job_id --noheader -Oorigin,siblingsactive -a
spawn $my_squeue -a --local --jobs=$job_id --noheader -Oorigin,siblingsactive
expect {
-re "(\\S+)\\s+(\\S+)" {
set origin $expect_out(1,string)
......@@ -295,7 +295,7 @@ proc validate_fed_job { cname job_id expected_origin expected_sib submit_cluster
continue
}
set my_squeue "${fed_slurm_base}/$tmp_sib/bin/squeue"
spawn $my_squeue --jobs=$job_id --noheader -Oorigin,siblingsactive
spawn $my_squeue -a --local --jobs=$job_id --noheader -Oorigin,siblingsactive
set match 0
expect {
-re "(\\S+)\\s+(\\S+)" {
......
......@@ -122,7 +122,7 @@ proc check_ctl_state { job_id state cluster } {
global scontrol
set job_state 0
spawn $scontrol -M$cluster show job $job_id -a
spawn $scontrol -M$cluster -a --local show job $job_id
expect {
-re "JobState=$state" {
set job_state 1
......@@ -147,7 +147,7 @@ proc check_missing_job { job_id cluster } {
global scontrol
set matched 0
spawn $scontrol -M$cluster show job $job_id -a
spawn $scontrol -M$cluster -a --local show job $job_id
expect {
"slurm_load_jobs error: Invalid job id specified" {
set matched 1
......@@ -268,7 +268,7 @@ proc check_hold { job } {
global scontrol number exit_code
set matches 0
spawn $scontrol show job $job
spawn $scontrol -a --local show job $job
expect {
"Priority=0" {
incr matches
......@@ -298,7 +298,7 @@ proc check_exit_hold { job } {
global scontrol number exit_code
set matches 0
spawn $scontrol show job $job
spawn $scontrol -a --local show job $job
expect {
"Priority=0" {
incr matches
......
......@@ -162,7 +162,7 @@ proc verify {fed job_id pattern error_message} {
set matches 0
set my_squeue "${fed_slurm_base}/$fed/bin/squeue"
spawn $my_squeue -j $job_id --noheader \
spawn $my_squeue -a --local -j $job_id --noheader \
-Ostatecompact:.5,siblingsviable:.20,siblingsactive:.20
expect {
-re "\\s+$pattern" {
......
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