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

tweak a couple of tests for problems experienced in new version

of expect on ubuntu 7.10
parent 6f8b472d
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,6 @@ set file_out "test$test_id.output" ...@@ -37,7 +37,6 @@ set file_out "test$test_id.output"
set file_err "test$test_id.error" set file_err "test$test_id.error"
set exit_code 0 set exit_code 0
set login_grp_info "" set login_grp_info ""
set job_grp_info ""
set got_job_grps 0 set got_job_grps 0
set got_login_grps 0 set got_login_grps 0
set got_sleep_err 0 set got_sleep_err 0
...@@ -61,7 +60,7 @@ exec echo "$bin_echo INITIAL_VALUE" >$file_out ...@@ -61,7 +60,7 @@ exec echo "$bin_echo INITIAL_VALUE" >$file_out
# #
spawn $bin_id spawn $bin_id
expect { expect {
-re "(uid=.*\n)" { -re "(uid=$number)" {
set login_grp_info $expect_out(1,string) set login_grp_info $expect_out(1,string)
set got_login_grps 1 set got_login_grps 1
exp_continue exp_continue
...@@ -99,8 +98,7 @@ if {[wait_for_file $file_out] == 0} { ...@@ -99,8 +98,7 @@ if {[wait_for_file $file_out] == 0} {
send_user "\nFAILURE: stdout file not truncated\n" send_user "\nFAILURE: stdout file not truncated\n"
set exit_code 1 set exit_code 1
} }
-re "(uid=.*\n)" { -re "$login_grp_info" {
set job_grp_info $expect_out(1,string)
incr got_job_grps incr got_job_grps
exp_continue exp_continue
} }
...@@ -118,10 +116,6 @@ if {$got_job_grps != 1} { ...@@ -118,10 +116,6 @@ if {$got_job_grps != 1} {
send_user "\nFAILURE: User and group ID info missing from stdout\n" send_user "\nFAILURE: User and group ID info missing from stdout\n"
set exit_code 1 set exit_code 1
} }
if {[string compare $login_grp_info $job_grp_info] != 0} {
send_user "\nFAILURE: Login and slurm user info mismatch\n"
set exit_code 1
}
# #
# Check for sleep input specification error in stderr # Check for sleep input specification error in stderr
...@@ -182,8 +176,7 @@ set got_job_grps 0 ...@@ -182,8 +176,7 @@ set got_job_grps 0
if {[wait_for_file $file_out] == 0} { if {[wait_for_file $file_out] == 0} {
spawn $bin_cat $file_out spawn $bin_cat $file_out
expect { expect {
-re "(uid=.*\n)" { -re "$login_grp_info" {
set job_grp_info $expect_out(1,string)
incr got_job_grps incr got_job_grps
exp_continue exp_continue
} }
......
#!/usr/bin/expect #!/usr/bin/expect
############################################################################ ############################################################################
# Purpose: Test of SLURM functionality # Purpose: Test of SLURM functionality
# Test of sbatcj --open-mode (truncate or append) option. # Test of sbatch --open-mode (truncate or append) option.
# #
# 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
...@@ -37,7 +37,6 @@ set file_out "test$test_id.output" ...@@ -37,7 +37,6 @@ set file_out "test$test_id.output"
set file_err "test$test_id.error" set file_err "test$test_id.error"
set exit_code 0 set exit_code 0
set login_grp_info "" set login_grp_info ""
set job_grp_info ""
set got_job_grps 0 set got_job_grps 0
set got_login_grps 0 set got_login_grps 0
set got_sleep_err 0 set got_sleep_err 0
...@@ -61,7 +60,7 @@ exec echo "$bin_echo INITIAL_VALUE" >$file_out ...@@ -61,7 +60,7 @@ exec echo "$bin_echo INITIAL_VALUE" >$file_out
# #
spawn $bin_id spawn $bin_id
expect { expect {
-re "(uid=.*\n)" { -re "(uid=$number)" {
set login_grp_info $expect_out(1,string) set login_grp_info $expect_out(1,string)
set got_login_grps 1 set got_login_grps 1
exp_continue exp_continue
...@@ -103,8 +102,7 @@ if {[wait_for_file $file_out] == 0} { ...@@ -103,8 +102,7 @@ if {[wait_for_file $file_out] == 0} {
send_user "\nFAILURE: stdout file not truncated\n" send_user "\nFAILURE: stdout file not truncated\n"
set exit_code 1 set exit_code 1
} }
-re "(uid=.*\n)" { -re "$login_grp_info" {
set job_grp_info $expect_out(1,string)
incr got_job_grps incr got_job_grps
exp_continue exp_continue
} }
...@@ -122,10 +120,6 @@ if {$got_job_grps != 1} { ...@@ -122,10 +120,6 @@ if {$got_job_grps != 1} {
send_user "\nFAILURE: User and group ID info missing from stdout\n" send_user "\nFAILURE: User and group ID info missing from stdout\n"
set exit_code 1 set exit_code 1
} }
if {[string compare $login_grp_info $job_grp_info] != 0} {
send_user "\nFAILURE: Login and slurm user info mismatch\n"
set exit_code 1
}
# #
# Check for sleep input specification error in stderr # Check for sleep input specification error in stderr
...@@ -190,8 +184,7 @@ set got_job_grps 0 ...@@ -190,8 +184,7 @@ set got_job_grps 0
if {[wait_for_file $file_out] == 0} { if {[wait_for_file $file_out] == 0} {
spawn $bin_cat $file_out spawn $bin_cat $file_out
expect { expect {
-re "(uid=.*\n)" { -re "$login_grp_info" {
set job_grp_info $expect_out(1,string)
incr got_job_grps incr got_job_grps
exp_continue exp_continue
} }
......
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