Fix tab completion erroring with spack unit-test
(#29405)
This commit is contained in:

committed by
Massimiliano Culpo

parent
9edfd25134
commit
d4f2326824
@@ -117,7 +117,7 @@ def format(self, cmd):
|
||||
'virtual': '_providers',
|
||||
'namespace': '_repos',
|
||||
'hash': '_all_resource_hashes',
|
||||
'pytest': '_tests',
|
||||
'pytest': '_unit_tests',
|
||||
}
|
||||
|
||||
|
||||
|
@@ -208,10 +208,10 @@ _repos() {
|
||||
SPACK_COMPREPLY="$SPACK_REPOS"
|
||||
}
|
||||
|
||||
_tests() {
|
||||
_unit_tests() {
|
||||
if [[ -z "${SPACK_TESTS:-}" ]]
|
||||
then
|
||||
SPACK_TESTS="$(spack test -l)"
|
||||
SPACK_TESTS="$(spack unit-test -l)"
|
||||
fi
|
||||
SPACK_COMPREPLY="$SPACK_TESTS"
|
||||
}
|
||||
|
@@ -208,10 +208,10 @@ _repos() {
|
||||
SPACK_COMPREPLY="$SPACK_REPOS"
|
||||
}
|
||||
|
||||
_tests() {
|
||||
_unit_tests() {
|
||||
if [[ -z "${SPACK_TESTS:-}" ]]
|
||||
then
|
||||
SPACK_TESTS="$(spack test -l)"
|
||||
SPACK_TESTS="$(spack unit-test -l)"
|
||||
fi
|
||||
SPACK_COMPREPLY="$SPACK_TESTS"
|
||||
}
|
||||
@@ -1780,7 +1780,7 @@ _spack_unit_test() {
|
||||
then
|
||||
SPACK_COMPREPLY="-h --help -H --pytest-help -l --list -L --list-long -N --list-names --extension -s -k --showlocals"
|
||||
else
|
||||
_tests
|
||||
_unit_tests
|
||||
fi
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user