Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
31bee386
Commit
31bee386
authored
8 years ago
by
Brian Christiansen
Browse files
Options
Downloads
Patches
Plain Diff
Move test function to globals file
parent
2586ee65
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
testsuite/expect/globals_federation
+38
-0
38 additions, 0 deletions
testsuite/expect/globals_federation
testsuite/expect/test37.1
+1
-32
1 addition, 32 deletions
testsuite/expect/test37.1
with
39 additions
and
32 deletions
testsuite/expect/globals_federation
+
38
−
0
View file @
31bee386
...
...
@@ -182,3 +182,41 @@ proc delete_federations { names } {
return $rc
}
proc get_clusterfed_info { fed_name } {
global sacctmgr fedc1 fedc2 fedc3 eol
set matches 0
array set clusters {}
set my_pid [spawn $sacctmgr show cluster $fedc1 $fedc2 $fedc3 \
format="cluster%20,federation%20,index,controlhost,controlport,weight,fedstate"]
expect {
-re "Cluster\\s+Federation\\s+Index\\s+ControlHost\\s+ControlPort\\s+Weight\\s+FedState $eol" {
incr matches
exp_continue
}
-re "\\s+(\\S+)\\s+$fed_name\\s+(\\d+)\\s+(\\S+)\\s+(\\d+)\\s+(\\d+)\\s+(\\S*) $eol" {
set clusters($expect_out(1,string)) [dict create index $expect_out(2,string) \
host $expect_out(3,string) \
port $expect_out(4,string) \
weight $expect_out(5,string) \
state $expect_out(6,string)]
incr matches
exp_continue
}
timeout {
send_user "\nFAILURE: sacctmgr add not responding\n"
slow_kill $my_pid
exit 1
}
eof {
wait
}
}
if {$matches != 4} {
send_user "$matches FAILURE: didn't match enough clustesr for\
$fed_name.\n"
exit 1
}
return [array get clusters]
}
This diff is collapsed.
Click to expand it.
testsuite/expect/test37.1
+
1
−
32
View file @
31bee386
...
...
@@ -52,8 +52,6 @@ set fed_name "feda"
set eol "\r\n"
array set clusters {}
set timeout 5
print_header $test_id
...
...
@@ -110,36 +108,7 @@ if {[setup_federation $fed_name]} {
}
# Get cluster/fed info from db
set matches 0
set my_pid [spawn $sacctmgr show cluster $fedc1 $fedc2 $fedc3 \
format="cluster%20,federation%20,index,controlhost,controlport,weight,fedstate"]
expect {
-re "Cluster\\s+Federation\\s+Index\\s+ControlHost\\s+ControlPort\\s+Weight\\s+FedState $eol" {
incr matches
exp_continue
}
-re "\\s+(\\S+)\\s+$fed_name\\s+(\\d+)\\s+(\\S+)\\s+(\\d+)\\s+(\\d+)\\s+(\\S*) $eol" {
set clusters($expect_out(1,string)) [dict create index $expect_out(2,string) \
host $expect_out(3,string) \
port $expect_out(4,string) \
weight $expect_out(5,string) \
state $expect_out(6,string)]
incr matches
exp_continue
}
timeout {
send_user "\nFAILURE: sacctmgr add not responding\n"
slow_kill $my_pid
end_it 1
}
eof {
wait
}
}
if {$matches != 4} {
send_user "$matches FAILURE: unexpected error.\n"
end_it 1
}
array set clusters [get_clusterfed_info $fed_name]
# Match db info with what cluster has.
set matches 0
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment