Skip to content
Snippets Groups Projects
Commit 35f8370a authored by Danny Auble's avatar Danny Auble
Browse files

Fix various tests to work when having PrologFlags=contain

parent bc3903d1
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,7 @@ proc inc12_3_1 {job_id_1 job_id_2 job_name_1 job_name_2 test_acct} { ...@@ -34,7 +34,7 @@ proc inc12_3_1 {job_id_1 job_id_2 job_name_1 job_name_2 test_acct} {
set idmatch 0 set idmatch 0
send_user "\nSearch for job ID $job_id_1 having name $job_name_1 (Within: inc12.3.1)\n" send_user "\nSearch for job ID $job_id_1 having name $job_name_1 (Within: inc12.3.1)\n"
send_user "\nJob id1 number: $job_id_1\n" send_user "\nJob id1 number: $job_id_1\n"
spawn $sacct -A '$test_acct' --name=$job_name_1 -p -o jobid spawn $sacct -A '$test_acct' --name=$job_name_1 -X -p -o jobid
expect { expect {
-re "$job_id_1" { -re "$job_id_1" {
incr idmatch incr idmatch
...@@ -60,7 +60,7 @@ proc inc12_3_1 {job_id_1 job_id_2 job_name_1 job_name_2 test_acct} { ...@@ -60,7 +60,7 @@ proc inc12_3_1 {job_id_1 job_id_2 job_name_1 job_name_2 test_acct} {
set idmatch 0 set idmatch 0
send_user "\nSearch for job ID $job_id_2 having name $job_name_2 (Within: inc12.3.1)\n" send_user "\nSearch for job ID $job_id_2 having name $job_name_2 (Within: inc12.3.1)\n"
spawn $sacct -A '$test_acct' --name=$job_name_2 -p -o jobid spawn $sacct -A '$test_acct' --name=$job_name_2 -X -p -o jobid
expect { expect {
-re "$job_id_1" { -re "$job_id_1" {
incr idmatch incr idmatch
......
...@@ -35,7 +35,7 @@ proc inc12_3_2 {job_id_1 job_id_2 job_id_3 job_name_1 job_name_2 test_acct job_1 ...@@ -35,7 +35,7 @@ proc inc12_3_2 {job_id_1 job_id_2 job_id_3 job_name_1 job_name_2 test_acct job_1
send_user "\nSearch for jobs $job_id_1 and $job_id_3 on node: $job_1_node_0 (Within: inc12.3.2)\n" send_user "\nSearch for jobs $job_id_1 and $job_id_3 on node: $job_1_node_0 (Within: inc12.3.2)\n"
set job_1_match 0 set job_1_match 0
set job_2_match 0 set job_2_match 0
spawn $sacct -A '$test_acct' -N$job_1_node_0 -p -o jobid,jobname spawn $sacct -A '$test_acct' -N$job_1_node_0 -X -p -o jobid,jobname
expect { expect {
-re "$job_id_1" { -re "$job_id_1" {
incr job_1_match incr job_1_match
...@@ -66,7 +66,7 @@ proc inc12_3_2 {job_id_1 job_id_2 job_id_3 job_name_1 job_name_2 test_acct job_1 ...@@ -66,7 +66,7 @@ proc inc12_3_2 {job_id_1 job_id_2 job_id_3 job_name_1 job_name_2 test_acct job_1
send_user "\nSearch for jobs $job_id_1 and $job_id_2 on node: $job_1_node_2 (Within: inc12.3.2))\n" send_user "\nSearch for jobs $job_id_1 and $job_id_2 on node: $job_1_node_2 (Within: inc12.3.2))\n"
set job_1_match 0 set job_1_match 0
set job_2_match 0 set job_2_match 0
spawn $sacct -A '$test_acct' -N$job_1_node_2 -p -o jobid,jobname spawn $sacct -A '$test_acct' -N$job_1_node_2 -X -p -o jobid,jobname
expect { expect {
-re "$job_id_1" { -re "$job_id_1" {
incr job_1_match incr job_1_match
...@@ -93,7 +93,7 @@ proc inc12_3_2 {job_id_1 job_id_2 job_id_3 job_name_1 job_name_2 test_acct job_1 ...@@ -93,7 +93,7 @@ proc inc12_3_2 {job_id_1 job_id_2 job_id_3 job_name_1 job_name_2 test_acct job_1
send_user "\nSearch for jobs $job_id_1 and $job_id_2 on node: $job_2_node_0 (Within: inc12.3.2)\n" send_user "\nSearch for jobs $job_id_1 and $job_id_2 on node: $job_2_node_0 (Within: inc12.3.2)\n"
set job_1_match 0 set job_1_match 0
set job_2_match 0 set job_2_match 0
spawn $sacct -A '$test_acct' -N$job_2_node_0 -p -o jobid,jobname spawn $sacct -A '$test_acct' -N$job_2_node_0 -X -p -o jobid,jobname
expect { expect {
-re "$job_id_1" { -re "$job_id_1" {
incr job_1_match incr job_1_match
...@@ -120,7 +120,7 @@ proc inc12_3_2 {job_id_1 job_id_2 job_id_3 job_name_1 job_name_2 test_acct job_1 ...@@ -120,7 +120,7 @@ proc inc12_3_2 {job_id_1 job_id_2 job_id_3 job_name_1 job_name_2 test_acct job_1
send_user "\nSearch for jobs $job_id_2 and $job_id_3 on node: $job_2_node_1 (Within: inc12.3.2)\n" send_user "\nSearch for jobs $job_id_2 and $job_id_3 on node: $job_2_node_1 (Within: inc12.3.2)\n"
set job_1_match 0 set job_1_match 0
set job_2_match 0 set job_2_match 0
spawn $sacct -A '$test_acct' -N$job_2_node_1 -p -o jobid,jobname spawn $sacct -A '$test_acct' -N$job_2_node_1 -X -p -o jobid,jobname
expect { expect {
-re "$job_id_1" { -re "$job_id_1" {
incr job_1_match incr job_1_match
......
...@@ -208,11 +208,13 @@ proc sacct_job { soption job_id} { ...@@ -208,11 +208,13 @@ proc sacct_job { soption job_id} {
set exit_code 0 set exit_code 0
set matches 0 set matches 0
set not_support 0 set not_support 0
set total_opts "$sacct -$soption -X -p -j $job_id"
send_user "sacct -$soption -p -j $job_id\n" send_user "\n"
eval spawn $total_opts
if { $soption == "-brief" || $soption == "b" } { if { $soption == "-brief" || $soption == "b" } {
spawn $sacct -$soption -p -j $job_id
expect { expect {
-re "SLURM accounting storage is disabled" { -re "SLURM accounting storage is disabled" {
set not_support 1 set not_support 1
...@@ -245,7 +247,6 @@ proc sacct_job { soption job_id} { ...@@ -245,7 +247,6 @@ proc sacct_job { soption job_id} {
} }
if { $soption == "-long" || $soption == "l" } { if { $soption == "-long" || $soption == "l" } {
spawn $sacct -$soption -p -j $job_id
expect { expect {
-re "SLURM accounting storage is disabled" { -re "SLURM accounting storage is disabled" {
set not_support 1 set not_support 1
...@@ -302,7 +303,6 @@ proc sacct_job { soption job_id} { ...@@ -302,7 +303,6 @@ proc sacct_job { soption job_id} {
} }
if { $soption == "-noheader" || $soption == "n" } { if { $soption == "-noheader" || $soption == "n" } {
spawn $sacct -$soption -p -j $job_id
expect { expect {
-re "SLURM accounting storage is disabled" { -re "SLURM accounting storage is disabled" {
set not_support 1 set not_support 1
...@@ -347,7 +347,6 @@ proc sacct_job { soption job_id} { ...@@ -347,7 +347,6 @@ proc sacct_job { soption job_id} {
} }
if { $soption == "-parsable" || $soption == "p" } { if { $soption == "-parsable" || $soption == "p" } {
spawn $sacct -$soption -p -j $job_id
expect { expect {
-re "SLURM accounting storage is disabled" { -re "SLURM accounting storage is disabled" {
set not_support 1 set not_support 1
...@@ -380,8 +379,6 @@ proc sacct_job { soption job_id} { ...@@ -380,8 +379,6 @@ proc sacct_job { soption job_id} {
} }
if { $soption == "-parsable2" || $soption == "P" } { if { $soption == "-parsable2" || $soption == "P" } {
spawn $sacct -$soption -p -j $job_id
expect { expect {
-re "SLURM accounting storage is disabled" { -re "SLURM accounting storage is disabled" {
set not_support 1 set not_support 1
...@@ -414,7 +411,6 @@ proc sacct_job { soption job_id} { ...@@ -414,7 +411,6 @@ proc sacct_job { soption job_id} {
} }
if { $soption == "-verbose" || $soption == "v" } { if { $soption == "-verbose" || $soption == "v" } {
spawn $sacct -$soption -p -j $job_id
expect { expect {
-re "SLURM accounting storage is disabled" { -re "SLURM accounting storage is disabled" {
set not_support 1 set not_support 1
...@@ -477,10 +473,13 @@ proc sacct_vargs { soption vargs job_id} { ...@@ -477,10 +473,13 @@ proc sacct_vargs { soption vargs job_id} {
set exit_code 0 set exit_code 0
set matches 0 set matches 0
set not_support 0 set not_support 0
send_user "sacct -$soption $vargs -p -j $job_id\n" set total_opts "$sacct -$soption $vargs -X -p -j $job_id"
send_user "\n"
eval spawn $total_opts
if { $soption == "g" || $soption == "-gid" || $soption == "-group" || $soption == "u" || $soption == "-uid" || $soption == "-user"} { if { $soption == "g" || $soption == "-gid" || $soption == "-group" || $soption == "u" || $soption == "-uid" || $soption == "-user"} {
spawn $sacct -$soption $vargs -p -j $job_id
expect { expect {
-re "SLURM accounting storage is disabled" { -re "SLURM accounting storage is disabled" {
set not_support 1 set not_support 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