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

Modify test to work in both RedHat and Ubuntu

parent 54f9f603
No related branches found
No related tags found
No related merge requests found
......@@ -90,10 +90,16 @@ exec $bin_chmod 700 $file_prog
#
# Create an allocation
#
global env
set env(PS1) $prompt
set salloc_pid [spawn $salloc -N1 --exclusive --verbose -t2 $bin_bash]
expect {
-re "Granted job allocation ($number)" {
set job_id $expect_out(1,string)
send "export PS1=\"$prompt\"\r"
exp_continue
}
-re "export PS1=\"$prompt\"" {
exp_continue
}
timeout {
send_user "\nFAILURE: salloc not responding "
send_user "or failure to recognize prompt\n"
......
......@@ -36,6 +36,7 @@ source ./globals
set test_id "1.90"
set exit_code 0
set file_prog "test$test_id.prog"
set prompt "PROMPT:"
print_header $test_id
......@@ -109,11 +110,28 @@ exec $bin_chmod 700 $file_prog
# Create an allocation
#
set salloc_pid [spawn $salloc -N1 --exclusive --verbose -t2 $bin_bash]
expect {
-re "Granted job allocation ($number)" {
set job_id $expect_out(1,string)
send "export PS1=\"$prompt\"\r"
exp_continue
}
-re "export PS1=\"$prompt\"" {
exp_continue
}
timeout {
send_user "\nFAILURE: salloc not responding "
send_user "or failure to recognize prompt\n"
slow_kill $salloc_pid
exit 1
}
-re $prompt {
}
}
#
# Run a job step to get allocated processor count and affinity
#
expect -re $prompt
set full_mask -1
set timeout $max_job_delay
send "$srun -c1 $file_prog\r"
......
......@@ -145,10 +145,17 @@ exec $bin_chmod 700 $file_prog
# Create an allocation
#
global env
set env(PS1) $prompt
set env(SLURM_CPU_BIND) "verbose"
set salloc_pid [spawn $salloc -w $node_name -N1 --exclusive --verbose -t2 $bin_bash]
expect {
-re "Granted job allocation ($number)" {
set job_id $expect_out(1,string)
send "export PS1=\"$prompt\"\r"
exp_continue
}
-re "export PS1=\"$prompt\"" {
exp_continue
}
timeout {
send_user "\nFAILURE: salloc not responding "
send_user "or failure to recognize prompt\n"
......@@ -158,6 +165,7 @@ expect {
-re $prompt {
}
}
#############################################################################
#
# Run a job step to get allocated processor count and affinity
......
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