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