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
ae9e3779
Commit
ae9e3779
authored
16 years ago
by
Joseph P. Donaghy
Browse files
Options
Downloads
Patches
Plain Diff
Incorporated several option tests h, e, and V.
parent
9a8b4c66
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
testsuite/expect/test23.1
+138
-4
138 additions, 4 deletions
testsuite/expect/test23.1
with
138 additions
and
4 deletions
testsuite/expect/test23.1
+
138
−
4
View file @
ae9e3779
#!/usr/bin/expect
############################################################################
# Purpose: Test of SLURM functionality
# Test sstat
--usage option. (initially same as --help)
# Test sstat
h, e, and V options.
#
# Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR
# "FAILURE: ..." otherwise with an explanation of the failure, OR
# anything else indicates a failure mode that must be investigated.
############################################################################
# Copyright (C) 2008 Lawrence Livermore National Security.
# Copyright (C) 2008
- 2009
Lawrence Livermore National Security.
# Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
# Written by Joseph Donaghy <donaghy1@llnl.gov>
# LLNL-CODE-402394.
...
...
@@ -38,11 +38,29 @@ set not_support 0
print_header $test_id
################################################################
#
#
Report the sstat --help format
#
Proc: sstat_job
#
# Purpose: Pass sstat option and test
#
# Returns: Number of matches.
#
# Input: sstat options not requiring arguments
#
################################################################
proc sstat_job { soption } {
global sstat
set exit_code 0
set matches 0
set not_support 0
send_user "sstat -$soption \n"
spawn $sstat --help
if { $soption == "h" || $soption == "-help" } {
spawn $sstat -$soption
expect {
-re "sstat...OPTION" {
incr matches
...
...
@@ -65,9 +83,125 @@ expect {
}
}
if {$matches != 3} {
send_user "\nFAILURE: sstat -$soption failed ($matches)\n"
set exit_code 1
}
return $matches
}
if { $soption == "V" || $soption == "-version" } {
spawn $sstat -$soption
expect {
-re "slurm 1.4." {
incr matches
exp_continue
}
timeout {
send_user "\nFAILURE: sstat not responding\n"
set exit_code 1
}
eof {
wait
}
}
if {$matches != 1} {
send_user "\nFAILURE: sstat -$soption failed ($matches)\n"
set exit_code 1
}
return $matches
}
if { $soption == "e" || $soption == "-helpformat" } {
spawn $sstat -$soption
expect {
-re "AveCPU *AvePages *AveRSS *AveVMSize" {
incr matches
exp_continue
}
-re "JobID *MaxPages *MaxPagesNode *MaxPagesTask" {
incr matches
exp_continue
}
-re "MaxRSS *MaxRSSNode *MaxRSSTask *MaxVMSize" {
incr matches
exp_continue
}
-re "MaxVMSizeNode *MaxVMSizeTask *MinCPU *MinCPUNode" {
incr matches
exp_continue
}
-re "MinCPUTask *NTasks *SystemCPU *TotalCPU" {
incr matches
exp_continue
}
timeout {
send_user "\nFAILURE: sstat not responding\n"
set exit_code 1
}
eof {
wait
}
}
if {$matches != 5} {
send_user "\nFAILURE: sstat -$soption failed ($matches)\n"
set exit_code 1
}
return $matches
}
}
################################################################
set matches [sstat_job h ]
if {$matches != 3} {
send_user "\nFAILURE: sstat -h failed ($matches)\n"
set exit_code 1
} else {
send_user "\nsstat -h test GOOD!\n"
}
set matches [sstat_job -help ]
if {$matches != 3} {
send_user "\nFAILURE: sstat --help failed ($matches)\n"
set exit_code 1
} else {
send_user "\nsstat --help test GOOD!\n"
}
set matches [sstat_job V ]
if {$matches != 1} {
send_user "\nFAILURE: sstat -V failed ($matches)\n"
set exit_code 1
} else {
send_user "\nsstat -V test GOOD!\n"
}
set matches [sstat_job -version ]
if {$matches != 1} {
send_user "\nFAILURE: sstat --version failed ($matches)\n"
set exit_code 1
} else {
send_user "\nsstat --version test GOOD!\n"
}
set matches [sstat_job e ]
if {$matches != 5} {
send_user "\nFAILURE: sstat -e failed ($matches)\n"
set exit_code 1
} else {
send_user "\nsstat -e test GOOD!\n"
}
set matches [sstat_job -helpformat ]
if {$matches != 5} {
send_user "\nFAILURE: sstat --helpformat failed ($matches)\n"
set exit_code 1
} else {
send_user "\nsstat --helpformat test GOOD!\n"
}
if {$exit_code == 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