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
73dfb902
Commit
73dfb902
authored
15 years ago
by
Joseph P. Donaghy
Browse files
Options
Downloads
Patches
Plain Diff
Update for recent modifications to sshare.
parent
587c74e7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
testsuite/expect/test24.2
+13
-24
13 additions, 24 deletions
testsuite/expect/test24.2
with
13 additions
and
24 deletions
testsuite/expect/test24.2
+
13
−
24
View file @
73dfb902
#!/usr/bin/expect
#!/usr/bin/expect
############################################################################
############################################################################
# Purpose: Test of SLURM sshare functionality
# Purpose: Test of SLURM sshare functionality
# sshare h,
n,
p, P, v and V options.
# sshare h, p, P, v and V options.
#
#
# 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
...
@@ -65,7 +65,7 @@ proc sshare_opt { soption } {
...
@@ -65,7 +65,7 @@ proc sshare_opt { soption } {
set not_support 0
set not_support 0
send_user "$sshare -$soption \n"
send_user "$sshare -$soption \n"
if { $soption == "-help"|| $soption == "-usage"
|| $soption == "h"
} {
if { $soption == "-help"|| $soption == "-usage" } {
spawn $sshare -$soption
spawn $sshare -$soption
expect {
expect {
...
@@ -77,17 +77,17 @@ proc sshare_opt { soption } {
...
@@ -77,17 +77,17 @@ proc sshare_opt { soption } {
set not_support 2
set not_support 2
exp_continue
exp_continue
}
}
-re "sshare
..
.OPTION
.....COMMAND
" {
-re "
Usage: *
sshare
*
.OPTION" {
if {$debug} {send_user "\nmatch1\n"}
if {$debug} {send_user "\nmatch1\n"}
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "Valid
.
OPTION
. value
s are" {
-re "Valid OPTIONs are" {
if {$debug} {send_user "\nmatch2\n"}
if {$debug} {send_user "\nmatch2\n"}
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "
Valid .COMMAND. values are
" {
-re "
verbose *display more information
" {
if {$debug} {send_user "\nmatch3\n"}
if {$debug} {send_user "\nmatch3\n"}
incr matches
incr matches
exp_continue
exp_continue
...
@@ -118,7 +118,7 @@ proc sshare_opt { soption } {
...
@@ -118,7 +118,7 @@ proc sshare_opt { soption } {
return $matches
return $matches
}
}
if { $soption == "-noheader" || $soption == "
n
" } {
if { $soption == "-noheader" || $soption == "
h
" } {
spawn $sshare -$soption
spawn $sshare -$soption
expect {
expect {
...
@@ -178,7 +178,7 @@ proc sshare_opt { soption } {
...
@@ -178,7 +178,7 @@ proc sshare_opt { soption } {
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "Raw Usage\\|
Norm Usage\\|Effectv Usag
e\\|" {
-re "Raw Usage\\|
Effectv Usage\\|Fair-shar
e\\|" {
if {$debug} {send_user "\nmatch5\n"}
if {$debug} {send_user "\nmatch5\n"}
incr matches
incr matches
exp_continue
exp_continue
...
@@ -220,16 +220,11 @@ proc sshare_opt { soption } {
...
@@ -220,16 +220,11 @@ proc sshare_opt { soption } {
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "Raw Usage\\|
Norm Usage\\|Effectv Usag
e" {
-re "Raw Usage\\|
Effectv Usage\\|Fair-shar
e" {
if {$debug} {send_user "\nmatch7\n"}
if {$debug} {send_user "\nmatch7\n"}
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "Raw Usage\\|Norm Usage\\|Effectv Usage\\|" {
if {$debug} {send_user "\nmatch8\n"}
incr matches
exp_continue
}
timeout {
timeout {
send_user "\nFAILURE: sshare not responding\n"
send_user "\nFAILURE: sshare not responding\n"
set exit_code 1
set exit_code 1
...
@@ -269,17 +264,17 @@ proc sshare_opt { soption } {
...
@@ -269,17 +264,17 @@ proc sshare_opt { soption } {
exp_continue
exp_continue
}
}
-re "Users requested" {
-re "Users requested" {
if {$debug} {send_user "\nmatch
9
\n"}
if {$debug} {send_user "\nmatch
8
\n"}
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "Accounts requested" {
-re "Accounts requested" {
if {$debug} {send_user "\nmatch
10
\n"}
if {$debug} {send_user "\nmatch
9
\n"}
incr matches
incr matches
exp_continue
exp_continue
}
}
-re "sshare: .* loaded" {
-re "sshare: .* loaded" {
if {$debug} {send_user "\nmatch1
1
\n"}
if {$debug} {send_user "\nmatch1
0
\n"}
incr matches
incr matches
exp_continue
exp_continue
}
}
...
@@ -323,7 +318,7 @@ proc sshare_opt { soption } {
...
@@ -323,7 +318,7 @@ proc sshare_opt { soption } {
exp_continue
exp_continue
}
}
-re "slurm $number.$number.$number" {
-re "slurm $number.$number.$number" {
if {$debug} {send_user "\nmatch1
2
\n"}
if {$debug} {send_user "\nmatch1
1
\n"}
incr matches
incr matches
exp_continue
exp_continue
}
}
...
@@ -356,12 +351,6 @@ proc sshare_opt { soption } {
...
@@ -356,12 +351,6 @@ proc sshare_opt { soption } {
################################################################
################################################################
set matches [sshare_opt h ]
if {$matches != 3} {
send_user "\nFAILURE: sshare -h failed ($matches)\n"
set exit_code 1
}
set matches [sshare_opt -help ]
set matches [sshare_opt -help ]
if {$matches != 3} {
if {$matches != 3} {
send_user "\nFAILURE: sshare --help failed ($matches)\n"
send_user "\nFAILURE: sshare --help failed ($matches)\n"
...
@@ -374,7 +363,7 @@ if {$matches != 3} {
...
@@ -374,7 +363,7 @@ if {$matches != 3} {
set exit_code 1
set exit_code 1
}
}
set matches [sshare_opt
n
]
set matches [sshare_opt
h
]
if {$matches != 0} {
if {$matches != 0} {
send_user "\nFAILURE: sshare -n failed ($matches)\n"
send_user "\nFAILURE: sshare -n failed ($matches)\n"
set exit_code 1
set exit_code 1
...
...
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