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

Fix test to test correctly the tres variables

parent 0ae29469
No related branches found
No related tags found
No related merge requests found
...@@ -83,20 +83,17 @@ set pba pbatch ...@@ -83,20 +83,17 @@ set pba pbatch
set dw DefaultWCKey set dw DefaultWCKey
set wk WCKeys set wk WCKeys
set fs Fairshare set fs Fairshare
set gm GrpCPUMins set gm GrpTRESMins
set gc GrpCPUs set gc GrpTRES
set gj GrpJobs set gj GrpJobs
set gs GrpSubmitJobs set gs GrpSubmitJobs
set gn GrpNodes
set gw GrpWall set gw GrpWall
set mm MaxCPUMins set mm MaxTRESMins
set mp MaxCPUMinsPerJob set mp MaxTRESMinsPerJob
set mc MaxCPUs set mc MaxTRES
set mu MaxCPUsPerJob set mu MaxTRESPerJob
set mj MaxJobs set mj MaxJobs
set ms MaxSubmitJobs set ms MaxSubmitJobs
set mn MaxNodes
set mnj MaxNodesPerJob
set mw MaxWall set mw MaxWall
set md MaxWallDurationPerJob set md MaxWallDurationPerJob
...@@ -108,14 +105,13 @@ array set acct_req { ...@@ -108,14 +105,13 @@ array set acct_req {
description appliedacct description appliedacct
organization organization organization organization
fairshare 5678 fairshare 5678
grpcpumins 5500 grptresmins cpu=5500
grpcpus 50 grptres cpu=50,node=530
grpjobs 510 grpjobs 510
grpsubmitjobs 520 grpsubmitjobs 520
grpnodes 530
grpwall 300 grpwall 300
maxcpus 540 maxtres cpu=540,node=570
maxcpumins 550000 maxtresmins cpu=550000
maxjobs 550 maxjobs 550
maxsubmitjobs 560 maxsubmitjobs 560
maxnodes 570 maxnodes 570
...@@ -128,16 +124,14 @@ array set acct_req2 { ...@@ -128,16 +124,14 @@ array set acct_req2 {
description theoryacct description theoryacct
organization theoryorg organization theoryorg
fairshare 4321 fairshare 4321
grpcpumins 4000 grptresmins cpu=4000
grpcpus 40 grptres cpu=40,node=430
grpjobs 410 grpjobs 410
grpnodes 430
grpsubmitjobs 420 grpsubmitjobs 420
grpwall 240 grpwall 240
maxcpumins 420000 maxtresmins cpu=420000
maxcpus 440 maxtres cpu=440,node=470
maxjobs 450 maxjobs 450
maxnodes 470
maxsubmitjobs 460 maxsubmitjobs 460
maxwall 280 maxwall 280
} }
...@@ -149,16 +143,14 @@ array set acct_req3 { ...@@ -149,16 +143,14 @@ array set acct_req3 {
description physicsacct description physicsacct
organization physicsorg organization physicsorg
fairshare 3240 fairshare 3240
grpcpumins 3300 grptresmins cpu=3300
grpcpus 30 grptres cpu=30,node=330
grpjobs 310 grpjobs 310
grpnodes 330
grpsubmitjobs 320 grpsubmitjobs 320
grpwall 180 grpwall 180
maxcpumins 330000 maxtresmins cpu=330000
maxcpus 340 maxtres cpu=340,node=370
maxjobs 350 maxjobs 350
maxnodes 370
maxsubmitjobs 360 maxsubmitjobs 360
maxwall 210 maxwall 210
} }
...@@ -172,16 +164,14 @@ array set user_req { ...@@ -172,16 +164,14 @@ array set user_req {
defaultwckey hole defaultwckey hole
wckey latch,stone,turn wckey latch,stone,turn
fairshare 3240 fairshare 3240
grpcpumins 3300 grptresmins cpu=3300
grpcpus 30 grptres cpu=30,node=330
grpjobs 310 grpjobs 310
grpnodes 330
grpsubmitjobs 320 grpsubmitjobs 320
grpwall 180 grpwall 180
maxcpumins 330000 maxtresmins cpu=330000
maxcpus 340 maxtres cpu=340,node=370
maxjobs 350 maxjobs 350
maxnodes 370
maxsubmitjobs 360 maxsubmitjobs 360
maxwall 210 maxwall 210
} }
...@@ -195,16 +185,14 @@ array set user_req2 { ...@@ -195,16 +185,14 @@ array set user_req2 {
defaultwckey stone defaultwckey stone
wckey latch,hole,turn wckey latch,hole,turn
fairshare 2375 fairshare 2375
grpcpumins 2000 grptresmins cpu=2000
grpcpus 20 grptres cpu=20,node=230
grpjobs 210 grpjobs 210
grpnodes 230
grpsubmitjobs 220 grpsubmitjobs 220
grpwall 120 grpwall 120
maxcpumins 220000 maxtresmins cpu=220000
maxcpus 240 maxtres cpu=240,node=270
maxjobs 250 maxjobs 250
maxnodes 270
maxsubmitjobs 260 maxsubmitjobs 260
maxwall 140 maxwall 140
...@@ -219,16 +207,14 @@ array set user_req3 { ...@@ -219,16 +207,14 @@ array set user_req3 {
defaultwckey latch defaultwckey latch
wckey stone,hole,turn wckey stone,hole,turn
fairshare 1000 fairshare 1000
grpcpumins 1100 grptresmins cpu=1100
grpcpus 10 grptres cpu=10,node=140
grpjobs 120 grpjobs 120
grpnodes 140
grpsubmitjobs 130 grpsubmitjobs 130
grpwall 60 grpwall 60
maxcpumins 110000 maxtresmins cpu=110000
maxcpus 150 maxtres cpu=150,node=180
maxjobs 160 maxjobs 160
maxnodes 180
maxsubmitjobs 170 maxsubmitjobs 170
maxwall 70 maxwall 70
...@@ -241,15 +227,13 @@ set user_req3(defaultaccount) $ta2 ...@@ -241,15 +227,13 @@ set user_req3(defaultaccount) $ta2
# Clusters # Clusters
array set clus_req { array set clus_req {
fairshare 6789 fairshare 6789
grpcpus 60 grptres cpu=60,node=630
grpjob 610 grpjob 610
grpsubmit 620 grpsubmit 620
grpnodes 630 maxtres cpu=640,node=670
maxcpus 640 maxtresmin cpu=660000
maxcpumin 660000
maxjobs 650 maxjobs 650
maxsubmit 660 maxsubmit 660
maxnodes 670
maxwall 2880 maxwall 2880
} }
# I couldn't figure out how to make a variable in an array to = the value of # I couldn't figure out how to make a variable in an array to = the value of
...@@ -416,7 +400,7 @@ while {[gets $tfile line] != -1} { ...@@ -416,7 +400,7 @@ while {[gets $tfile line] != -1} {
if {![string compare $line "No such file or directory"]} { if {![string compare $line "No such file or directory"]} {
send_user "FAILURE: there was a problem with the sacctmgr command\n" send_user "FAILURE: there was a problem with the sacctmgr command\n"
incr exit_code 1 incr exit_code 1
} elseif {![string compare $line "$clu - '$tc3':$fs=$clus_req(fairshare):$gc=$clus_req(grpcpus):$gj=$clus_req(grpjob):$gn=$clus_req(grpnodes):$gs=$clus_req(grpsubmit):$mp=$clus_req(maxcpumin):$mu=$clus_req(maxcpus):$mj=$clus_req(maxjobs):$mnj=$clus_req(maxnodes):$ms=$clus_req(maxsubmit):$md=$clus_req(maxwall):$qs='$clus_req(qos)'"]} { } elseif {![string compare $line "$clu - '$tc3':$fs=$clus_req(fairshare):$gc=$clus_req(grptres):$gj=$clus_req(grpjob):$gs=$clus_req(grpsubmit):$mp=$clus_req(maxtresmin):$mu=$clus_req(maxtres):$mj=$clus_req(maxjobs):$ms=$clus_req(maxsubmit):$md=$clus_req(maxwall):$qs='$clus_req(qos)'"]} {
send_user "match 1\n" send_user "match 1\n"
incr matches incr matches
} elseif {![string compare $line "$par - '$roo'"]} { } elseif {![string compare $line "$par - '$roo'"]} {
...@@ -425,32 +409,32 @@ while {[gets $tfile line] != -1} { ...@@ -425,32 +409,32 @@ while {[gets $tfile line] != -1} {
} elseif {![string compare $line "$usr - '$roo':$dac='$roo':$al='$ala':$fs=1"]} { } elseif {![string compare $line "$usr - '$roo':$dac='$roo':$al='$ala':$fs=1"]} {
send_user "match 3\n" send_user "match 3\n"
incr matches incr matches
} elseif {![string compare $line "$acc - '$ta4':$dsc='$acct_req(description)':$org='$acct_req(organization)':$fs=$acct_req(fairshare):$gm=$acct_req(grpcpumins):$gc=$acct_req(grpcpus):$gj=$acct_req(grpjobs):$gn=$acct_req(grpnodes):$gs=$acct_req(grpsubmitjobs):$gw=$acct_req(grpwall):$mp=$acct_req(maxcpumins):$mu=$acct_req(maxcpus):$mj=$acct_req(maxjobs):$mnj=$acct_req(maxnodes):$ms=$acct_req(maxsubmitjobs):$md=$acct_req(maxwall):$qs='$acct_req(qos)'"]} { } elseif {![string compare $line "$acc - '$ta4':$dsc='$acct_req(description)':$org='$acct_req(organization)':$fs=$acct_req(fairshare):$gm=$acct_req(grptresmins):$gc=$acct_req(grptres):$gj=$acct_req(grpjobs):$gs=$acct_req(grpsubmitjobs):$gw=$acct_req(grpwall):$mp=$acct_req(maxtresmins):$mu=$acct_req(maxtres):$mj=$acct_req(maxjobs):$ms=$acct_req(maxsubmitjobs):$md=$acct_req(maxwall):$qs='$acct_req(qos)'"]} {
send_user "match 4\n" send_user "match 4\n"
incr matches incr matches
} elseif {![string compare $line "$par - '$ta4'"]} { } elseif {![string compare $line "$par - '$ta4'"]} {
send_user "match 5\n" send_user "match 5\n"
incr matches incr matches
} elseif {![string compare $line "$usr - '$tu3':$dac='$user_req(defaultaccount)':$dw='$user_req(defaultwckey)':$al='$user_req(adminlevel)':$wk='$wckey_check':$fs=$user_req(fairshare):$gm=$user_req(grpcpumins):$gc=$user_req(grpcpus):$gj=$user_req(grpjobs):$gn=$user_req(grpnodes):$gs=$user_req(grpsubmitjobs):$gw=$user_req(grpwall):$mp=$user_req(maxcpumins):$mu=$user_req(maxcpus):$mj=$user_req(maxjobs):$mnj=$user_req(maxnodes):$ms=$user_req(maxsubmitjobs):$md=$user_req(maxwall):$qs='$user_req(qos)'"]} { } elseif {![string compare $line "$usr - '$tu3':$dac='$user_req(defaultaccount)':$dw='$user_req(defaultwckey)':$al='$user_req(adminlevel)':$wk='$wckey_check':$fs=$user_req(fairshare):$gm=$user_req(grptresmins):$gc=$user_req(grptres):$gj=$user_req(grpjobs):$gs=$user_req(grpsubmitjobs):$gw=$user_req(grpwall):$mp=$user_req(maxtresmins):$mu=$user_req(maxtres):$mj=$user_req(maxjobs):$ms=$user_req(maxsubmitjobs):$md=$user_req(maxwall):$qs='$user_req(qos)'"]} {
# should come through 2 times # should come through 2 times
send_user "match 6\n" send_user "match 6\n"
incr matches incr matches
} elseif {![string compare $line "$acc - '$ta3':$dsc='$acct_req2(description)':$org='$acct_req2(organization)':$fs=$acct_req2(fairshare):$gm=$acct_req2(grpcpumins):$gc=$acct_req2(grpcpus):$gj=$acct_req2(grpjobs):$gn=$acct_req2(grpnodes):$gs=$acct_req2(grpsubmitjobs):$gw=$acct_req2(grpwall):$mp=$acct_req2(maxcpumins):$mu=$acct_req2(maxcpus):$mj=$acct_req2(maxjobs):$mnj=$acct_req2(maxnodes):$ms=$acct_req2(maxsubmitjobs):$md=$acct_req2(maxwall):$qs='$acct_req2(qos)'"]} { } elseif {![string compare $line "$acc - '$ta3':$dsc='$acct_req2(description)':$org='$acct_req2(organization)':$fs=$acct_req2(fairshare):$gm=$acct_req2(grptresmins):$gc=$acct_req2(grptres):$gj=$acct_req2(grpjobs):$gs=$acct_req2(grpsubmitjobs):$gw=$acct_req2(grpwall):$mp=$acct_req2(maxtresmins):$mu=$acct_req2(maxtres):$mj=$acct_req2(maxjobs):$ms=$acct_req2(maxsubmitjobs):$md=$acct_req2(maxwall):$qs='$acct_req2(qos)'"]} {
send_user "match 7\n" send_user "match 7\n"
incr matches incr matches
} elseif {![string compare $line "$par - '$ta3'"]} { } elseif {![string compare $line "$par - '$ta3'"]} {
send_user "match 8\n" send_user "match 8\n"
incr matches incr matches
} elseif {![string compare $line "$acc - '$ta2':$dsc='$acct_req3(description)':$org='$acct_req3(organization)':$fs=$acct_req3(fairshare):$gm=$acct_req3(grpcpumins):$gc=$acct_req3(grpcpus):$gj=$acct_req3(grpjobs):$gn=$acct_req3(grpnodes):$gs=$acct_req3(grpsubmitjobs):$gw=$acct_req3(grpwall):$mp=$acct_req3(maxcpumins):$mu=$acct_req3(maxcpus):$mj=$acct_req3(maxjobs):$mnj=$acct_req3(maxnodes):$ms=$acct_req3(maxsubmitjobs):$md=$acct_req3(maxwall):$qs='$acct_req3(qos)'"]} { } elseif {![string compare $line "$acc - '$ta2':$dsc='$acct_req3(description)':$org='$acct_req3(organization)':$fs=$acct_req3(fairshare):$gm=$acct_req3(grptresmins):$gc=$acct_req3(grptres):$gj=$acct_req3(grpjobs):$gs=$acct_req3(grpsubmitjobs):$gw=$acct_req3(grpwall):$mp=$acct_req3(maxtresmins):$mu=$acct_req3(maxtres):$mj=$acct_req3(maxjobs):$ms=$acct_req3(maxsubmitjobs):$md=$acct_req3(maxwall):$qs='$acct_req3(qos)'"]} {
send_user "match 9\n" send_user "match 9\n"
incr matches incr matches
} elseif {![string compare $line "$par - '$ta2'"]} { } elseif {![string compare $line "$par - '$ta2'"]} {
send_user "match 10\n" send_user "match 10\n"
incr matches incr matches
} elseif {![string compare $line "$usr - '$tu1':$dac='$user_req3(defaultaccount)':$dw='$user_req3(defaultwckey)':$wk='$wckey_check':$fs=$user_req3(fairshare):$gm=$user_req3(grpcpumins):$gc=$user_req3(grpcpus):$gj=$user_req3(grpjobs):$gn=$user_req3(grpnodes):$gs=$user_req3(grpsubmitjobs):$gw=$user_req3(grpwall):$mp=$user_req3(maxcpumins):$mu=$user_req3(maxcpus):$mj=$user_req3(maxjobs):$mnj=$user_req3(maxnodes):$ms=$user_req3(maxsubmitjobs):$md=$user_req3(maxwall):$qs='$user_req3(qos)'"]} { } elseif {![string compare $line "$usr - '$tu1':$dac='$user_req3(defaultaccount)':$dw='$user_req3(defaultwckey)':$wk='$wckey_check':$fs=$user_req3(fairshare):$gm=$user_req3(grptresmins):$gc=$user_req3(grptres):$gj=$user_req3(grpjobs):$gs=$user_req3(grpsubmitjobs):$gw=$user_req3(grpwall):$mp=$user_req3(maxtresmins):$mu=$user_req3(maxtres):$mj=$user_req3(maxjobs):$ms=$user_req3(maxsubmitjobs):$md=$user_req3(maxwall):$qs='$user_req3(qos)'"]} {
send_user "match 11\n" send_user "match 11\n"
incr matches incr matches
} elseif {![string compare $line "$usr - '$tu2':$dac='$user_req2(defaultaccount)':$dw='$user_req2(defaultwckey)':$al='$user_req2(adminlevel)':$wk='$wckey_check':$fs=$user_req2(fairshare):$gm=$user_req2(grpcpumins):$gc=$user_req2(grpcpus):$gj=$user_req2(grpjobs):$gn=$user_req2(grpnodes):$gs=$user_req2(grpsubmitjobs):$gw=$user_req2(grpwall):$mp=$user_req2(maxcpumins):$mu=$user_req2(maxcpus):$mj=$user_req2(maxjobs):$mnj=$user_req2(maxnodes):$ms=$user_req2(maxsubmitjobs):$md=$user_req2(maxwall):$qs='$user_req2(qos)'"]} { } elseif {![string compare $line "$usr - '$tu2':$dac='$user_req2(defaultaccount)':$dw='$user_req2(defaultwckey)':$al='$user_req2(adminlevel)':$wk='$wckey_check':$fs=$user_req2(fairshare):$gm=$user_req2(grptresmins):$gc=$user_req2(grptres):$gj=$user_req2(grpjobs):$gs=$user_req2(grpsubmitjobs):$gw=$user_req2(grpwall):$mp=$user_req2(maxtresmins):$mu=$user_req2(maxtres):$mj=$user_req2(maxjobs):$ms=$user_req2(maxsubmitjobs):$md=$user_req2(maxwall):$qs='$user_req2(qos)'"]} {
# should come through 2 times # should come through 2 times
send_user "match 12\n" send_user "match 12\n"
incr matches incr matches
......
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