Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
36cf7338
Commit
36cf7338
authored
4 years ago
by
Tamara Dahlgren
Browse files
Options
Downloads
Patches
Plain Diff
Restore test subcommand list limited to the first line though
parent
4c19b58a
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
lib/spack/spack/cmd/test.py
+18
-7
18 additions, 7 deletions
lib/spack/spack/cmd/test.py
with
18 additions
and
7 deletions
lib/spack/spack/cmd/test.py
+
18
−
7
View file @
36cf7338
...
@@ -25,11 +25,17 @@
...
@@ -25,11 +25,17 @@
level
=
"
long
"
level
=
"
long
"
def
first_line
(
docstring
):
"""
Return the first line of the docstring.
"""
return
docstring
.
split
(
'
\n
'
)[
0
]
def
setup_parser
(
subparser
):
def
setup_parser
(
subparser
):
sp
=
subparser
.
add_subparsers
(
metavar
=
'
SUBCOMMAND
'
,
dest
=
'
test_command
'
)
sp
=
subparser
.
add_subparsers
(
metavar
=
'
SUBCOMMAND
'
,
dest
=
'
test_command
'
)
# Run
# Run
run_parser
=
sp
.
add_parser
(
'
run
'
,
description
=
test_run
.
__doc__
)
run_parser
=
sp
.
add_parser
(
'
run
'
,
description
=
test_run
.
__doc__
,
help
=
first_line
(
test_run
.
__doc__
))
alias_help_msg
=
"
Provide an alias for this test-suite
"
alias_help_msg
=
"
Provide an alias for this test-suite
"
alias_help_msg
+=
"
for subsequent access.
"
alias_help_msg
+=
"
for subsequent access.
"
...
@@ -80,31 +86,36 @@ def setup_parser(subparser):
...
@@ -80,31 +86,36 @@ def setup_parser(subparser):
arguments
.
add_common_arguments
(
run_parser
,
[
'
installed_specs
'
])
arguments
.
add_common_arguments
(
run_parser
,
[
'
installed_specs
'
])
# List
# List
list_parser
=
sp
.
add_parser
(
'
list
'
,
description
=
test_list
.
__doc__
)
list_parser
=
sp
.
add_parser
(
'
list
'
,
description
=
test_list
.
__doc__
,
help
=
first_line
(
test_list
.
__doc__
))
list_parser
.
add_argument
(
list_parser
.
add_argument
(
'
filter
'
,
nargs
=
argparse
.
REMAINDER
,
'
filter
'
,
nargs
=
argparse
.
REMAINDER
,
help
=
'
optional case-insensitive glob patterns to filter results.
'
)
help
=
'
optional case-insensitive glob patterns to filter results.
'
)
# Find
# Find
find_parser
=
sp
.
add_parser
(
'
find
'
,
description
=
test_find
.
__doc__
)
find_parser
=
sp
.
add_parser
(
'
find
'
,
description
=
test_find
.
__doc__
,
help
=
first_line
(
test_find
.
__doc__
))
find_parser
.
add_argument
(
find_parser
.
add_argument
(
'
filter
'
,
nargs
=
argparse
.
REMAINDER
,
'
filter
'
,
nargs
=
argparse
.
REMAINDER
,
help
=
'
optional case-insensitive glob patterns to filter results.
'
)
help
=
'
optional case-insensitive glob patterns to filter results.
'
)
# Status
# Status
status_parser
=
sp
.
add_parser
(
'
status
'
,
description
=
test_status
.
__doc__
)
status_parser
=
sp
.
add_parser
(
'
status
'
,
description
=
test_status
.
__doc__
,
help
=
first_line
(
test_status
.
__doc__
))
status_parser
.
add_argument
(
status_parser
.
add_argument
(
'
names
'
,
nargs
=
argparse
.
REMAINDER
,
'
names
'
,
nargs
=
argparse
.
REMAINDER
,
help
=
"
Test suites for which to print status
"
)
help
=
"
Test suites for which to print status
"
)
# Results
# Results
results_parser
=
sp
.
add_parser
(
'
results
'
,
description
=
test_results
.
__doc__
)
results_parser
=
sp
.
add_parser
(
'
results
'
,
description
=
test_results
.
__doc__
,
help
=
first_line
(
test_results
.
__doc__
))
results_parser
.
add_argument
(
results_parser
.
add_argument
(
'
names
'
,
nargs
=
argparse
.
REMAINDER
,
'
names
'
,
nargs
=
argparse
.
REMAINDER
,
help
=
"
Test suites for which to print results
"
)
help
=
"
Test suites for which to print results
"
)
# Remove
# Remove
remove_parser
=
sp
.
add_parser
(
'
remove
'
,
description
=
test_remove
.
__doc__
)
remove_parser
=
sp
.
add_parser
(
'
remove
'
,
description
=
test_remove
.
__doc__
,
help
=
first_line
(
test_remove
.
__doc__
))
arguments
.
add_common_arguments
(
remove_parser
,
[
'
yes_to_all
'
])
arguments
.
add_common_arguments
(
remove_parser
,
[
'
yes_to_all
'
])
remove_parser
.
add_argument
(
remove_parser
.
add_argument
(
'
names
'
,
nargs
=
argparse
.
REMAINDER
,
'
names
'
,
nargs
=
argparse
.
REMAINDER
,
...
@@ -112,7 +123,7 @@ def setup_parser(subparser):
...
@@ -112,7 +123,7 @@ def setup_parser(subparser):
def
test_run
(
args
):
def
test_run
(
args
):
"""
Run tests for the specified installed packages
"""
Run tests for the specified installed packages
.
If no specs are listed, run tests for all packages in the current
If no specs are listed, run tests for all packages in the current
environment or all installed packages if there is no active environment.
environment or all installed packages if there is no active environment.
...
...
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