Bugfix: allow test_* build-time and stand-alone tests (#45699)

This commit is contained in:
Tamara Dahlgren
2024-08-13 16:58:00 -07:00
committed by GitHub
parent e40c10509d
commit 8ba6e7eed2
2 changed files with 5 additions and 0 deletions

View File

@@ -757,6 +757,10 @@ def test_process(pkg: Pb, kwargs):
pkg.tester.status(pkg.spec.name, TestStatus.SKIPPED)
return
# Make sure properly named build-time test methods actually run as
# stand-alone tests.
pkg.run_tests = True
# run test methods from the package and all virtuals it provides
v_names = virtuals(pkg)
test_specs = [pkg.spec] + [spack.spec.Spec(v_name) for v_name in sorted(v_names)]