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

Minor patches to test suite

parent 3c55e946
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,7 @@ source ./globals
set test_id "1.59"
set exit_code 0
set file_in "test$test_id.input"
set num_nodes 3
set node_count 0
set task_count 0
......@@ -53,7 +54,7 @@ if {[string compare [switch_type] "elan"] == 0} {
send_user "\nWARNING: This test incompatible with Elan switch\n"
exit $exit_code
}
#find out if we have enough nodes to test functionality
# find out if we have enough nodes to test functionality
set partition [default_partition]
spawn $scontrol show partition $partition
expect {
......@@ -84,8 +85,16 @@ set node2 0
set node3 0
set node4 0
#
# Build input script file
#
make_bash_script $file_in "
export PS1=\"$prompt\"
$bin_bash --norc
"
set timeout $max_job_delay
spawn $salloc -N$num_nodes -v bash
set salloc_pid [spawn $salloc -N$num_nodes -v -t1 ./$file_in]
expect {
-re "salloc: Granted job allocation ($number)" {
set job_id $expect_out(1,string)
......@@ -96,13 +105,14 @@ expect {
}
timeout {
send_user "\nFAILURE: srun not responding\n"
kill_srun
slow_kill $salloc_pid
set exit_code 1
}
eof {
wait
}
}
exec $bin_rm -f $file_in
if {$job_id == 0} {
send_user "\nFAILURE: salloc failure\n"
exit 1
......
......@@ -50,6 +50,7 @@
#include "src/sshare/sshare.h"
/* set up some fake system */
void *acct_db_conn = NULL;
uint32_t cluster_cpus = 50;
int long_flag = 1;
int exit_code = 0;
......
......@@ -213,9 +213,10 @@ proc sinfo_test_2 { node proc_cnt total_procs } {
# allocate a set of nodes (node_cnt) and the quit right after
proc allocate_and_quit { node proc_cnt total_procs } {
global salloc scontrol sinfo number alpha_numeric_under
global prompt select_type procs_per_node
global bin_bash salloc scontrol sinfo number alpha_numeric_under
global prompt select_type procs_per_node test_id bin_rm
set file_in "test$test_id.input"
set job_id 0
set num_alloc 0
set block ""
......@@ -223,7 +224,12 @@ proc allocate_and_quit { node proc_cnt total_procs } {
set timeout 60
set idle_cpus [expr $total_procs - $proc_cnt]
set mypid [spawn $salloc -w $node -N 1 -t 5 -n $proc_cnt bash]
make_bash_script $file_in "
export PS1=\"$prompt\"
$bin_bash --norc
"
set mypid [spawn $salloc -w $node -N 1 -t 5 -n $proc_cnt ./$file_in]
expect {
-re "Granted job allocation ($number)" {
set job_id $expect_out(1,string)
......@@ -268,6 +274,7 @@ proc allocate_and_quit { node proc_cnt total_procs } {
wait
}
}
exec $bin_rm -f $file_in
return $rc
}
......
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