fix error handling for spack test results command (#19987)

This commit is contained in:
Greg Becker 2020-11-18 16:16:34 -08:00 committed by GitHub
parent 3b9155239b
commit 10f784338b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -333,6 +333,7 @@ def test_results(args):
if names:
test_suites = [spack.install_test.get_test_suite(name) for name
in names]
test_suites = list(filter(lambda ts: ts is not None, test_suites))
if not test_suites:
tty.msg('No test suite(s) found in test stage: {0}'
.format(', '.join(names)))