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

Harden job resize test

bug 3498
parent 2c064672
No related branches found
No related tags found
No related merge requests found
...@@ -74,6 +74,7 @@ make_bash_script $file_in " ...@@ -74,6 +74,7 @@ make_bash_script $file_in "
. slurm_job_\${SLURM_JOBID}_resize.sh . slurm_job_\${SLURM_JOBID}_resize.sh
$scontrol show job \${SLURM_JOBID} >>${file_out2} $scontrol show job \${SLURM_JOBID} >>${file_out2}
$srun -l $bin_id $srun -l $bin_id
echo SLURM_NNODES=\${SLURM_NNODES}
$bin_rm -f slurm_job_\${SLURM_JOBID}_resize.csh $bin_rm -f slurm_job_\${SLURM_JOBID}_resize.csh
$bin_rm -f slurm_job_\${SLURM_JOBID}_resize.sh" $bin_rm -f slurm_job_\${SLURM_JOBID}_resize.sh"
...@@ -108,6 +109,7 @@ if {[wait_for_file $file_out] != 0} { ...@@ -108,6 +109,7 @@ if {[wait_for_file $file_out] != 0} {
exit 1 exit 1
} }
set task_count 0 set task_count 0
set node_count 0
spawn $bin_cat $file_out spawn $bin_cat $file_out
expect { expect {
-re "slurm_allocation_lookup_lite" { -re "slurm_allocation_lookup_lite" {
...@@ -122,14 +124,24 @@ expect { ...@@ -122,14 +124,24 @@ expect {
incr task_count incr task_count
exp_continue exp_continue
} }
-re "SLURM_NNODES=($number)" {
set node_count $expect_out(1,string)
exp_continue
}
eof { eof {
wait wait
} }
} }
if {$task_count != 3} { set task_target [expr $node_cnt + 1]
send_user "\nFAILURE: Invalid task count ($task_count != 3)\n\n\n" if {$task_count != $task_target} {
send_user "\nFAILURE: Invalid task count ($task_count != $task_target)\n\n\n"
set exit_code 1 set exit_code 1
} elseif (!$exit_code) { }
if {$node_count != 1} {
send_user "\nFAILURE: Invalid node count ($node_count != 1)\n\n\n"
set exit_code 1
}
if {$exit_code == 0} {
send_user "\nSo far, so good...\n\n\n" send_user "\nSo far, so good...\n\n\n"
} }
......
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