From 3370d3f57e2685963ed155e86ce635e1e0644b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BE=E5=9C=B0=20=E5=B8=8C=E7=95=99=E8=80=B6?= <65301509+KiruyaMomochi@users.noreply.github.com> Date: Thu, 10 Mar 2022 00:09:57 +0900 Subject: [PATCH] Fix tab completion erroring with `spack unit-test` (#29405) --- lib/spack/spack/cmd/commands.py | 2 +- share/spack/bash/spack-completion.in | 4 ++-- share/spack/spack-completion.bash | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/cmd/commands.py b/lib/spack/spack/cmd/commands.py index 5822bc06cae..25653b58ae4 100644 --- a/lib/spack/spack/cmd/commands.py +++ b/lib/spack/spack/cmd/commands.py @@ -117,7 +117,7 @@ def format(self, cmd): 'virtual': '_providers', 'namespace': '_repos', 'hash': '_all_resource_hashes', - 'pytest': '_tests', + 'pytest': '_unit_tests', } diff --git a/share/spack/bash/spack-completion.in b/share/spack/bash/spack-completion.in index 803563d9ce3..f9cf846ec5f 100755 --- a/share/spack/bash/spack-completion.in +++ b/share/spack/bash/spack-completion.in @@ -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" } diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index bd7ae6db254..ff8506d36e4 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -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" } @@ -1793,7 +1793,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 }