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

Add test for sattach layout

parent 0d6029fb
No related branches found
No related tags found
No related merge requests found
...@@ -374,7 +374,8 @@ test16.1 Confirm sattach usage option works (--usage option). ...@@ -374,7 +374,8 @@ test16.1 Confirm sattach usage option works (--usage option).
test16.2 Confirm sattach help option works (--help option). test16.2 Confirm sattach help option works (--help option).
test16.3 Confirm that sattach reports a proper version number test16.3 Confirm that sattach reports a proper version number
(--version option). (--version option).
test16.4 Basic sattach functionality test (--verbose and --label options). test16.4 Basic sattach functionality test (--layout, --verbose and
--label options).
test17.# Testing of sbatch options. test17.# Testing of sbatch options.
......
#!/usr/bin/expect #!/usr/bin/expect
############################################################################ ############################################################################
# Purpose: Test of SLURM functionality # Purpose: Test of SLURM functionality
# Basic sattach functionality test (--verbose and --label options). # Basic sattach functionality test (--layout, --verbose and
# --label options).
# #
# Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR # Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR
# "FAILURE: ..." otherwise with an explanation of the failure, OR # "FAILURE: ..." otherwise with an explanation of the failure, OR
...@@ -86,6 +87,31 @@ if {$matches != 4} { ...@@ -86,6 +87,31 @@ if {$matches != 4} {
exit 1 exit 1
} }
#
# Get task layout information
#
set matches 0
spawn $sattach --layout $job_id.0
set attach_id $spawn_id
expect {
-i $attach_id
-re "4 tasks, ($number) nodes" {
incr matches
exp_continue
}
timeout {
send_user "\nFAILURE: sattach not responding\n"
set exit_code 1
}
eof {
wait
}
}
if {$matches == 0} {
send_user "\nFAILURE: layout information not printed\n"
set exit_code 1
}
# #
# Attach to initial program # Attach to initial program
# #
...@@ -116,7 +142,7 @@ expect { ...@@ -116,7 +142,7 @@ expect {
} }
if {$matches != 5} { if {$matches != 5} {
send_user "\nFAILURE: job run time failure\n" send_user "\nFAILURE: job run time failure\n"
set exit_code 1 set exit_code 1
} }
# #
......
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